mirror of
https://github.com/KAMKEEL/CustomNPC-Plus.git
synced 2026-11-12 00:17:27 +00:00
Fixed item toss event not being cancellable. Setting a script container's engine doesn't happen on every script call now, reducing lag.
This commit is contained in:
1 parent
2ec6e5b753
commit
a0adf0d7bd
9 files changed
+28
-4
No files matched your search
@@ -58,7 +58,7 @@ public class ScriptItemEventHandler {
|
||||
try {
|
||||
if (event.entityItem.getEntityItem().getItem() == CustomItems.scripted_item && !event.isCanceled()) {
|
||||
IItemCustom isw = ItemScripted.GetWrapper(event.entityItem.getEntityItem());
|
||||
EventHooks.onScriptItemTossed(isw, event.player, event.entityItem);
|
||||
event.setCanceled(EventHooks.onScriptItemTossed(isw, event.player, event.entityItem));
|
||||
}
|
||||
} catch (Exception e) {}
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user