From fae693e3eaecfb8905eaa34c5b212ae3e6c007ac Mon Sep 17 00:00:00 2001 From: Mgazul Date: Mon, 7 Oct 2024 21:36:16 +0800 Subject: [PATCH] Fix Inventory Close --- .../bukkit/craftbukkit/v1_12_R1/event/CraftEventFactory.java | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/main/java/org/bukkit/craftbukkit/v1_12_R1/event/CraftEventFactory.java b/src/main/java/org/bukkit/craftbukkit/v1_12_R1/event/CraftEventFactory.java index 7a790cbc72..c68c2bbac8 100644 --- a/src/main/java/org/bukkit/craftbukkit/v1_12_R1/event/CraftEventFactory.java +++ b/src/main/java/org/bukkit/craftbukkit/v1_12_R1/event/CraftEventFactory.java @@ -1063,6 +1063,9 @@ public static void handleInventoryCloseEvent(EntityPlayer human) { human.world.getServer().getPluginManager().callEvent(event); } human.openContainer.transferTo(human.inventoryContainer, human.getBukkitEntity()); + if (human instanceof EntityPlayerMP) { + ((EntityPlayerMP) human).getBukkitEntity().updateInventory(); + } } public static void handleEditBookEvent(EntityPlayerMP player, ItemStack newBookItem) {