From ab71bf0727ea425998056a4ae09c664b2f8e463a Mon Sep 17 00:00:00 2001 From: AJ Ferguson Date: Fri, 3 Jul 2020 12:18:35 -0800 Subject: [PATCH] Fix bug when dropping items from an open inventory --- .../inventory/action/InventoryActionDataTranslator.java | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/connector/src/main/java/org/geysermc/connector/network/translators/inventory/action/InventoryActionDataTranslator.java b/connector/src/main/java/org/geysermc/connector/network/translators/inventory/action/InventoryActionDataTranslator.java index 426627bfb..96cbd61fb 100644 --- a/connector/src/main/java/org/geysermc/connector/network/translators/inventory/action/InventoryActionDataTranslator.java +++ b/connector/src/main/java/org/geysermc/connector/network/translators/inventory/action/InventoryActionDataTranslator.java @@ -120,9 +120,9 @@ public class InventoryActionDataTranslator { session.sendDownstreamPacket(dropPacket); } } - ItemStack item = session.getInventory().getItem(javaSlot); + ItemStack item = inventory.getItem(javaSlot); if (item != null) { - session.getInventory().setItem(javaSlot, new ItemStack(item.getId(), item.getAmount() - dropAmount, item.getNbt())); + inventory.setItem(javaSlot, new ItemStack(item.getId(), item.getAmount() - dropAmount, item.getNbt())); } return; } else { //clicking outside of inventory