Skip to content

Commit

Permalink
Fix Inventory Close
Browse files Browse the repository at this point in the history
  • Loading branch information
Mgazul committed Oct 7, 2024
1 parent fae693e commit 70e1b5b
Showing 1 changed file with 4 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -1061,11 +1061,12 @@ public static void handleInventoryCloseEvent(EntityPlayer human) {
InventoryCloseEvent event = new InventoryCloseEvent(human.openContainer.getBukkitView());
if (human.openContainer.getBukkitView() != null) {
human.world.getServer().getPluginManager().callEvent(event);
if (human instanceof EntityPlayerMP) {
((EntityPlayerMP) human).getBukkitEntity().updateInventory();
}
}
human.openContainer.transferTo(human.inventoryContainer, human.getBukkitEntity());
if (human instanceof EntityPlayerMP) {
((EntityPlayerMP) human).getBukkitEntity().updateInventory();
}

}

public static void handleEditBookEvent(EntityPlayerMP player, ItemStack newBookItem) {
Expand Down

0 comments on commit 70e1b5b

Please sign in to comment.