RightClick Event for Scripted Items

This commit is contained in:
Kam committed 2024-02-21 00:31:17 -05:00
1 parent 4a58702d16
commit 7f2a375323
9 files changed
+101 -14

No files matched your search

@@ -85,6 +85,11 @@ public class EventHooks {
return NpcAPI.EVENT_BUS.post(event);
}
public static boolean onScriptItemRightClick(IItemCustom handler, noppes.npcs.scripted.event.ItemEvent.RightClickEvent event) {
((ScriptCustomItem) handler).callScript(EnumScriptType.RIGHT_CLICK, event);
return NpcAPI.EVENT_BUS.post(event);
}
public static boolean onScriptItemAttack(IItemCustom handler, noppes.npcs.scripted.event.ItemEvent.AttackEvent event) {
((ScriptCustomItem) handler).callScript(EnumScriptType.ATTACK, event);
return NpcAPI.EVENT_BUS.post(event);