Archiviert
13
0
Dieses Repository wurde am 2021-12-14 archiviert. Du kannst Dateien ansehen und es klonen, aber nicht pushen oder Issues/Pull-Requests öffnen.
SteamSpigot/Paper/SteamWar-Patches/0561-Fix-spigots-inventory-close-bugfix-paper.patch

26 Zeilen
1.4 KiB
Diff

2021-04-14 17:34:29 +02:00
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
From: Zeanon <thezeanon@gmail.com>
Date: Wed, 14 Apr 2021 16:22:22 +0200
Subject: [PATCH] Fix spigots inventory close bugfix paper
2020-12-28 17:00:27 +01:00
diff --git a/src/main/java/org/bukkit/craftbukkit/event/CraftEventFactory.java b/src/main/java/org/bukkit/craftbukkit/event/CraftEventFactory.java
2021-04-14 17:34:29 +02:00
index a4cd6c404c2a8d526c4673695aadd001f2b4516f..e7f856d1904943fd809cbee6de8b1d1562085f73 100644
--- a/src/main/java/org/bukkit/craftbukkit/event/CraftEventFactory.java
+++ b/src/main/java/org/bukkit/craftbukkit/event/CraftEventFactory.java
@@ -1379,10 +1379,12 @@ public class CraftEventFactory {
2020-12-28 17:00:27 +01:00
}
2021-04-12 19:54:42 +02:00
public static void handleInventoryCloseEvent(EntityHuman human, org.bukkit.event.inventory.InventoryCloseEvent.Reason reason) {
// Paper end
+ //Steamwar
// SPIGOT-5799 - no need to fire for when no inventory open
2020-12-28 17:00:27 +01:00
- if (human.activeContainer == human.defaultContainer) {
2021-04-12 19:54:42 +02:00
+ /*if (human.activeContainer == human.defaultContainer) {
return;
2020-12-28 17:00:27 +01:00
- }
2021-04-12 19:54:42 +02:00
+ }*/
+ //Steamwar End Spigot no?????
InventoryCloseEvent event = new InventoryCloseEvent(human.activeContainer.getBukkitView(), reason); // Paper
2020-12-28 17:00:27 +01:00
human.world.getServer().getPluginManager().callEvent(event);
human.activeContainer.transferTo(human.defaultContainer, human.getBukkitEntity());