SPIGOT-7620: Fix server crash when hoppers transfer items to double chests
This commit is contained in:
parent
8b4abeb03a
commit
ff20043879
@ -78,7 +78,7 @@
|
|||||||
+ destinationInventory = new CraftInventory(iinventory);
|
+ 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);
|
+ world.getCraftServer().getPluginManager().callEvent(event);
|
||||||
+ if (event.isCancelled()) {
|
+ if (event.isCancelled()) {
|
||||||
+ tileentityhopper.setItem(i, itemstack);
|
+ tileentityhopper.setItem(i, itemstack);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user