-
-
Notifications
You must be signed in to change notification settings - Fork 87
/
SentinelCrackShot.java
34 lines (30 loc) · 1.06 KB
/
SentinelCrackShot.java
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
package org.mcmonkey.sentinel.integration;
import org.bukkit.Bukkit;
import org.bukkit.entity.LivingEntity;
import org.bukkit.entity.Player;
import org.mcmonkey.sentinel.SentinelIntegration;
import org.mcmonkey.sentinel.SentinelTrait;
import com.shampaggon.crackshot.CSDirector;
public class SentinelCrackShot extends SentinelIntegration {
@Override
public String getTargetHelp() {
return "";
}
@Override
public boolean tryAttack(SentinelTrait st, LivingEntity ent) {
if (!(st.getLivingEntity() instanceof Player)) {
return false;
}
CSDirector direc = (CSDirector) Bukkit.getPluginManager().getPlugin("CrackShot");
String node = direc.returnParentNode((Player) st.getLivingEntity());
if (node == null) {
return false;
}
st.faceLocation(ent.getEyeLocation());
direc.csminion.weaponInteraction((Player) st.getLivingEntity(), node, false);
if (st.rangedChase) {
st.rechase();
}
return true;
}
}