Remove redundant clone in Dropper InventoryMoveItemEvent

This commit is contained in:
md_5 2024-07-20 11:31:34 +10:00
parent e61a53d25c
commit 76f59e3155
No known key found for this signature in database
GPG Key ID: E8E901AC7C617C11

View File

@ -45,7 +45,7 @@
+ destinationInventory = iinventory.getOwner().getInventory(); + destinationInventory = iinventory.getOwner().getInventory();
+ } + }
+ +
+ InventoryMoveItemEvent event = new InventoryMoveItemEvent(tileentitydispenser.getOwner().getInventory(), oitemstack.clone(), destinationInventory, true); + InventoryMoveItemEvent event = new InventoryMoveItemEvent(tileentitydispenser.getOwner().getInventory(), oitemstack, destinationInventory, true);
+ worldserver.getCraftServer().getPluginManager().callEvent(event); + worldserver.getCraftServer().getPluginManager().callEvent(event);
+ if (event.isCancelled()) { + if (event.isCancelled()) {
+ return; + return;