mirror of
https://github.com/KAMKEEL/CustomNPC-Plus.git
synced 2026-11-18 23:09:05 +00:00
Melee Swing Event
This commit is contained in:
1 parent
4f697e574e
commit
1393de181d
4 files changed
+33
No files matched your search
@@ -179,6 +179,15 @@ public class EventHooks {
|
||||
return NpcAPI.EVENT_BUS.post(event);
|
||||
}
|
||||
|
||||
public static boolean onNPCMeleeSwing(EntityNPCInterface npc, NpcEvent.SwingEvent event){
|
||||
if(npc == null || npc.wrappedNPC == null)
|
||||
return false;
|
||||
|
||||
ScriptController.Instance.globalNpcScripts.callScript(EnumScriptType.ATTACK_SWING, event);
|
||||
npc.script.callScript(EnumScriptType.ATTACK_SWING, event);
|
||||
return NpcAPI.EVENT_BUS.post(event);
|
||||
}
|
||||
|
||||
public static boolean onNPCRangedAttack(EntityNPCInterface npc, NpcEvent.RangedLaunchedEvent event){
|
||||
if(npc == null || npc.wrappedNPC == null)
|
||||
return false;
|
||||
|
||||
Reference in new issue
Block a user