Melee Swing Event

This commit is contained in:
Kam committed 2024-02-12 02:56:11 -05:00
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;