SPIGOT-6147: InventoryCloseEvent does not fire after closing player inventory

By: md_5 <git@md-5.net>
This commit is contained in:
CraftBukkit/Spigot
2020-10-01 19:07:54 +10:00
parent c94a28d0d5
commit e54c8b2f3c
2 changed files with 20 additions and 21 deletions

View File

@@ -1274,10 +1274,6 @@ public class CraftEventFactory {
}
public static void handleInventoryCloseEvent(EntityHuman human) {
// SPIGOT-5799 - no need to fire for when no inventory open
if (human.activeContainer == human.defaultContainer) {
return;
}
InventoryCloseEvent event = new InventoryCloseEvent(human.activeContainer.getBukkitView());
human.world.getServer().getPluginManager().callEvent(event);
human.activeContainer.transferTo(human.defaultContainer, human.getBukkitEntity());