SPIGOT-7620: Fix server crash when hoppers transfer items to double chests

By: 2008Choco <hawkeboyz2@hotmail.com>
This commit is contained in:
CraftBukkit/Spigot 2024-04-24 11:19:05 +10:00
parent 65d9b916a9
commit ad5b07669d

View File

@ -78,7 +78,7 @@
+ destinationInventory = new CraftInventory(iinventory);
+ }
+
+ InventoryMoveItemEvent event = new InventoryMoveItemEvent(iinventory.getOwner().getInventory(), oitemstack, destinationInventory, true);
+ InventoryMoveItemEvent event = new InventoryMoveItemEvent(tileentityhopper.getOwner().getInventory(), oitemstack, destinationInventory, true);
+ world.getCraftServer().getPluginManager().callEvent(event);
+ if (event.isCancelled()) {
+ tileentityhopper.setItem(i, itemstack);