diff options
Diffstat (limited to 'patches/server/0880-Add-titleOverride-to-InventoryOpenEvent.patch')
-rw-r--r-- | patches/server/0880-Add-titleOverride-to-InventoryOpenEvent.patch | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/patches/server/0880-Add-titleOverride-to-InventoryOpenEvent.patch b/patches/server/0880-Add-titleOverride-to-InventoryOpenEvent.patch index ba8d018f54..629f589fc2 100644 --- a/patches/server/0880-Add-titleOverride-to-InventoryOpenEvent.patch +++ b/patches/server/0880-Add-titleOverride-to-InventoryOpenEvent.patch @@ -5,10 +5,10 @@ Subject: [PATCH] Add titleOverride to InventoryOpenEvent diff --git a/src/main/java/net/minecraft/server/level/ServerPlayer.java b/src/main/java/net/minecraft/server/level/ServerPlayer.java -index 2ba005b04577d424128c60bb77ce07fa63b40251..2f880e10c73b48c4989c7623ea6cf368f4afb53a 100644 +index dc4a01f433bab7e8ecf6a156b748a0db784130e5..f56fc6bc4da573cd73c72e3c61a96c4f1eebeb94 100644 --- a/src/main/java/net/minecraft/server/level/ServerPlayer.java +++ b/src/main/java/net/minecraft/server/level/ServerPlayer.java -@@ -1656,12 +1656,17 @@ public class ServerPlayer extends net.minecraft.world.entity.player.Player { +@@ -1657,12 +1657,17 @@ public class ServerPlayer extends net.minecraft.world.entity.player.Player { this.nextContainerCounter(); AbstractContainerMenu container = factory.createMenu(this.containerCounter, this.getInventory(), this); @@ -27,7 +27,7 @@ index 2ba005b04577d424128c60bb77ce07fa63b40251..2f880e10c73b48c4989c7623ea6cf368 if (container == null && !cancelled) { // Let pre-cancelled events fall through // SPIGOT-5263 - close chest if cancelled if (factory instanceof Container) { -@@ -1683,7 +1688,7 @@ public class ServerPlayer extends net.minecraft.world.entity.player.Player { +@@ -1684,7 +1689,7 @@ public class ServerPlayer extends net.minecraft.world.entity.player.Player { } else { // CraftBukkit start this.containerMenu = container; @@ -79,10 +79,10 @@ index 12ab8f7cde88cd6ce3ad474fe2843d5d30c3c0d7..c1bad887d1340ebc7c63fda3dceff929 if (!player.isImmobile()) player.connection.send(new ClientboundOpenScreenPacket(container.containerId, windowType, io.papermc.paper.adventure.PaperAdventure.asVanilla(adventure$title))); // Paper - Prevent opening inventories when frozen player.containerMenu = container; diff --git a/src/main/java/org/bukkit/craftbukkit/event/CraftEventFactory.java b/src/main/java/org/bukkit/craftbukkit/event/CraftEventFactory.java -index 9f6d459146f502909d262a7178d5b8d5575c563c..e079e8f4078078d737a9d554dbcd2568b1a1f9eb 100644 +index 9d7bcd7a99cfda0776d267bada384304558fa6fe..6ca59ba6a713e452d146182d143b99b07696af8b 100644 --- a/src/main/java/org/bukkit/craftbukkit/event/CraftEventFactory.java +++ b/src/main/java/org/bukkit/craftbukkit/event/CraftEventFactory.java -@@ -1388,10 +1388,21 @@ public class CraftEventFactory { +@@ -1397,10 +1397,21 @@ public class CraftEventFactory { } public static AbstractContainerMenu callInventoryOpenEvent(ServerPlayer player, AbstractContainerMenu container) { @@ -105,7 +105,7 @@ index 9f6d459146f502909d262a7178d5b8d5575c563c..e079e8f4078078d737a9d554dbcd2568 if (player.containerMenu != player.inventoryMenu) { // fire INVENTORY_CLOSE if one already open player.connection.handleContainerClose(new ServerboundContainerClosePacket(player.containerMenu.containerId), InventoryCloseEvent.Reason.OPEN_NEW); // Paper - Inventory close reason } -@@ -1406,10 +1417,10 @@ public class CraftEventFactory { +@@ -1415,10 +1426,10 @@ public class CraftEventFactory { if (event.isCancelled()) { container.transferTo(player.containerMenu, craftPlayer); |