From e1bf1ed6c8ef88ad2e401778c1bbf9758be97628 Mon Sep 17 00:00:00 2001 From: Lixfel Date: Mon, 28 Dec 2020 17:00:27 +0100 Subject: [PATCH] Hotfix spigots own fault --- .../Fix_spigots_inventory_close_bugfix.patch | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) create mode 100644 SteamWar-Patches/Fix_spigots_inventory_close_bugfix.patch diff --git a/SteamWar-Patches/Fix_spigots_inventory_close_bugfix.patch b/SteamWar-Patches/Fix_spigots_inventory_close_bugfix.patch new file mode 100644 index 0000000..e202d38 --- /dev/null +++ b/SteamWar-Patches/Fix_spigots_inventory_close_bugfix.patch @@ -0,0 +1,19 @@ +Index: src/main/java/org/bukkit/craftbukkit/event/CraftEventFactory.java +IDEA additional info: +Subsystem: com.intellij.openapi.diff.impl.patch.CharsetEP +<+>UTF-8 +=================================================================== +diff --git a/src/main/java/org/bukkit/craftbukkit/event/CraftEventFactory.java b/src/main/java/org/bukkit/craftbukkit/event/CraftEventFactory.java +--- a/src/main/java/org/bukkit/craftbukkit/event/CraftEventFactory.java (revision 3bf75f9c719825476df0f5c8979efcd01105f93e) ++++ b/src/main/java/org/bukkit/craftbukkit/event/CraftEventFactory.java (date 1609170790072) +@@ -1255,10 +1255,6 @@ + } + + 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());