From e403d6aafcd1938d4e26bd1a18dc9874ce5c5806 Mon Sep 17 00:00:00 2001 From: Aikar Date: Sat, 29 May 2021 05:07:34 -0400 Subject: [PATCH] [Auto] Updated Upstream (CraftBukkit) Upstream has released updates that appear to apply and compile correctly. This update has not been tested by PaperMC and as with ANY update, please do your own testing CraftBukkit Changes: a0149bf16 SPIGOT-6480: Players cannot take books from lecterns that were opened by plugins --- Spigot-Server-Patches/0010-Adventure.patch | 6 +++--- .../0153-Shoulder-Entities-Release-API.patch | 4 ++-- .../0206-Add-method-to-open-already-placed-sign.patch | 4 ++-- .../0233-InventoryCloseEvent-Reason-API.patch | 6 +++--- .../0441-Prevent-opening-inventories-when-frozen.patch | 6 +++--- Spigot-Server-Patches/0473-Potential-bed-API.patch | 4 ++-- ...Add-additional-open-container-api-to-HumanEntity.patch | 4 ++-- .../0637-Added-PlayerLecternPageChangeEvent.patch | 8 ++++---- .../0706-add-isDeeplySleeping-to-HumanEntity.patch | 4 ++-- work/CraftBukkit | 2 +- 10 files changed, 24 insertions(+), 24 deletions(-) diff --git a/Spigot-Server-Patches/0010-Adventure.patch b/Spigot-Server-Patches/0010-Adventure.patch index 08e94a1f3..fb7c94002 100644 --- a/Spigot-Server-Patches/0010-Adventure.patch +++ b/Spigot-Server-Patches/0010-Adventure.patch @@ -2086,10 +2086,10 @@ index eea242af23825ad29ada6e997205e87edffb6bb9..3cf81734c8580f4d88ea97b6ac737a37 public void setCustomName(String name) { // sane limit for name length diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftHumanEntity.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftHumanEntity.java -index ea41fe964a707b31394e0f4701eb88e7227fa3a7..2e9fd45d52a915a6eab7e75f7d30f4bf3506078b 100644 +index 816f2cbebe849a9d9533f985298bcd5d36f660eb..24e856473a0050c0b097c179776350379d464d0c 100644 --- a/src/main/java/org/bukkit/craftbukkit/entity/CraftHumanEntity.java +++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftHumanEntity.java -@@ -315,9 +315,12 @@ public class CraftHumanEntity extends CraftLivingEntity implements HumanEntity { +@@ -318,9 +318,12 @@ public class CraftHumanEntity extends CraftLivingEntity implements HumanEntity { container = CraftEventFactory.callInventoryOpenEvent(player, container); if (container == null) return; @@ -2104,7 +2104,7 @@ index ea41fe964a707b31394e0f4701eb88e7227fa3a7..2e9fd45d52a915a6eab7e75f7d30f4bf getHandle().activeContainer = container; getHandle().activeContainer.addSlotListener(player); } -@@ -386,8 +389,12 @@ public class CraftHumanEntity extends CraftLivingEntity implements HumanEntity { +@@ -389,8 +392,12 @@ public class CraftHumanEntity extends CraftLivingEntity implements HumanEntity { // Now open the window Containers windowType = CraftContainer.getNotchInventoryType(inventory.getTopInventory()); diff --git a/Spigot-Server-Patches/0153-Shoulder-Entities-Release-API.patch b/Spigot-Server-Patches/0153-Shoulder-Entities-Release-API.patch index bf9f8b8cc..af2c2b7c2 100644 --- a/Spigot-Server-Patches/0153-Shoulder-Entities-Release-API.patch +++ b/Spigot-Server-Patches/0153-Shoulder-Entities-Release-API.patch @@ -58,10 +58,10 @@ index ba26fc2405e17d582da971d03147fb1865e9b546..63e8062ae3f3407b92b72b5fccaa958c @Override public abstract boolean isSpectator(); diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftHumanEntity.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftHumanEntity.java -index 2e9fd45d52a915a6eab7e75f7d30f4bf3506078b..c13f04de0d22ddf51c1f0c26c72da6062c07d8cf 100644 +index 24e856473a0050c0b097c179776350379d464d0c..893cea754ea1858d2b08ba377bbbc90e7c0efd6d 100644 --- a/src/main/java/org/bukkit/craftbukkit/entity/CraftHumanEntity.java +++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftHumanEntity.java -@@ -492,6 +492,32 @@ public class CraftHumanEntity extends CraftLivingEntity implements HumanEntity { +@@ -495,6 +495,32 @@ public class CraftHumanEntity extends CraftLivingEntity implements HumanEntity { getHandle().getCooldownTracker().setCooldown(CraftMagicNumbers.getItem(material), ticks); } diff --git a/Spigot-Server-Patches/0206-Add-method-to-open-already-placed-sign.patch b/Spigot-Server-Patches/0206-Add-method-to-open-already-placed-sign.patch index 0c9d0c20e..857ab9d50 100644 --- a/Spigot-Server-Patches/0206-Add-method-to-open-already-placed-sign.patch +++ b/Spigot-Server-Patches/0206-Add-method-to-open-already-placed-sign.patch @@ -5,7 +5,7 @@ Subject: [PATCH] Add method to open already placed sign diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftHumanEntity.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftHumanEntity.java -index c13f04de0d22ddf51c1f0c26c72da6062c07d8cf..16f907df4690098e6c45191963f1f98e2c505f82 100644 +index 893cea754ea1858d2b08ba377bbbc90e7c0efd6d..1333d425147e6dc7f21f755a9b25ead9723d4a28 100644 --- a/src/main/java/org/bukkit/craftbukkit/entity/CraftHumanEntity.java +++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftHumanEntity.java @@ -29,6 +29,7 @@ import net.minecraft.world.level.block.BlockEnchantmentTable; @@ -16,7 +16,7 @@ index c13f04de0d22ddf51c1f0c26c72da6062c07d8cf..16f907df4690098e6c45191963f1f98e import net.minecraft.world.level.block.state.IBlockData; import org.bukkit.GameMode; import org.bukkit.Location; -@@ -602,6 +603,17 @@ public class CraftHumanEntity extends CraftLivingEntity implements HumanEntity { +@@ -605,6 +606,17 @@ public class CraftHumanEntity extends CraftLivingEntity implements HumanEntity { } } diff --git a/Spigot-Server-Patches/0233-InventoryCloseEvent-Reason-API.patch b/Spigot-Server-Patches/0233-InventoryCloseEvent-Reason-API.patch index 7709f43f5..3a779bd68 100644 --- a/Spigot-Server-Patches/0233-InventoryCloseEvent-Reason-API.patch +++ b/Spigot-Server-Patches/0233-InventoryCloseEvent-Reason-API.patch @@ -152,10 +152,10 @@ index 3c49d7acd4ad0717886adf6c469e8a49a58e859b..b6effe1037f3ae59e6faa5f5d039b6ad this.activeContainer = this.defaultContainer; } diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftHumanEntity.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftHumanEntity.java -index 16f907df4690098e6c45191963f1f98e2c505f82..744cd929383ba56cd3435c8c092c8242b4e347e6 100644 +index 1333d425147e6dc7f21f755a9b25ead9723d4a28..3b3e6076f2565e02fa6f13e369094f8b6cac5382 100644 --- a/src/main/java/org/bukkit/craftbukkit/entity/CraftHumanEntity.java +++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftHumanEntity.java -@@ -372,7 +372,7 @@ public class CraftHumanEntity extends CraftLivingEntity implements HumanEntity { +@@ -375,7 +375,7 @@ public class CraftHumanEntity extends CraftLivingEntity implements HumanEntity { if (((EntityPlayer) getHandle()).playerConnection == null) return; if (getHandle().activeContainer != getHandle().defaultContainer) { // fire INVENTORY_CLOSE if one already open @@ -164,7 +164,7 @@ index 16f907df4690098e6c45191963f1f98e2c505f82..744cd929383ba56cd3435c8c092c8242 } EntityPlayer player = (EntityPlayer) getHandle(); Container container; -@@ -442,8 +442,13 @@ public class CraftHumanEntity extends CraftLivingEntity implements HumanEntity { +@@ -445,8 +445,13 @@ public class CraftHumanEntity extends CraftLivingEntity implements HumanEntity { @Override public void closeInventory() { diff --git a/Spigot-Server-Patches/0441-Prevent-opening-inventories-when-frozen.patch b/Spigot-Server-Patches/0441-Prevent-opening-inventories-when-frozen.patch index da65f89d7..b2d315bd4 100644 --- a/Spigot-Server-Patches/0441-Prevent-opening-inventories-when-frozen.patch +++ b/Spigot-Server-Patches/0441-Prevent-opening-inventories-when-frozen.patch @@ -36,10 +36,10 @@ index 79003f43c4f15a7e5dd51587bc8c2f477bedb1b2..5382dfbad7a33670268d5d713cf3bdd4 } diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftHumanEntity.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftHumanEntity.java -index 744cd929383ba56cd3435c8c092c8242b4e347e6..5e01ea53306acec8988aaccec62cd33e14156eef 100644 +index 3b3e6076f2565e02fa6f13e369094f8b6cac5382..3bfb93890259210afd2f5e226cef100d26a11628 100644 --- a/src/main/java/org/bukkit/craftbukkit/entity/CraftHumanEntity.java +++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftHumanEntity.java -@@ -321,7 +321,7 @@ public class CraftHumanEntity extends CraftLivingEntity implements HumanEntity { +@@ -324,7 +324,7 @@ public class CraftHumanEntity extends CraftLivingEntity implements HumanEntity { if (adventure$title == null) adventure$title = io.papermc.paper.adventure.PaperAdventure.LEGACY_SECTION_UXRC.deserialize(container.getBukkitView().getTitle()); // Paper //player.playerConnection.sendPacket(new PacketPlayOutOpenWindow(container.windowId, windowType, CraftChatMessage.fromString(title)[0])); // Paper // Paper - comment @@ -48,7 +48,7 @@ index 744cd929383ba56cd3435c8c092c8242b4e347e6..5e01ea53306acec8988aaccec62cd33e getHandle().activeContainer = container; getHandle().activeContainer.addSlotListener(player); } -@@ -395,7 +395,7 @@ public class CraftHumanEntity extends CraftLivingEntity implements HumanEntity { +@@ -398,7 +398,7 @@ public class CraftHumanEntity extends CraftLivingEntity implements HumanEntity { net.kyori.adventure.text.Component adventure$title = inventory.title(); // Paper if (adventure$title == null) adventure$title = io.papermc.paper.adventure.PaperAdventure.LEGACY_SECTION_UXRC.deserialize(inventory.getTitle()); // Paper //player.playerConnection.sendPacket(new PacketPlayOutOpenWindow(container.windowId, windowType, CraftChatMessage.fromString(title)[0])); // Paper - comment diff --git a/Spigot-Server-Patches/0473-Potential-bed-API.patch b/Spigot-Server-Patches/0473-Potential-bed-API.patch index 8de264c2f..dda9b9bba 100644 --- a/Spigot-Server-Patches/0473-Potential-bed-API.patch +++ b/Spigot-Server-Patches/0473-Potential-bed-API.patch @@ -8,7 +8,7 @@ Adds a new method to fetch the location of a player's bed without generating any getPotentialBedLocation - Gets the last known location of a player's bed. This does not preform any check if the bed is still valid and does not load any chunks. diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftHumanEntity.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftHumanEntity.java -index 5e01ea53306acec8988aaccec62cd33e14156eef..6fa61912cf9e4632bf4e11bd252aa26100f27531 100644 +index 3bfb93890259210afd2f5e226cef100d26a11628..4028f4bd87a183a808f4c9a19d51ee1c9b9e30f7 100644 --- a/src/main/java/org/bukkit/craftbukkit/entity/CraftHumanEntity.java +++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftHumanEntity.java @@ -13,6 +13,7 @@ import net.minecraft.network.chat.IChatBaseComponent; @@ -19,7 +19,7 @@ index 5e01ea53306acec8988aaccec62cd33e14156eef..6fa61912cf9e4632bf4e11bd252aa261 import net.minecraft.world.ITileInventory; import net.minecraft.world.entity.Entity; import net.minecraft.world.entity.EntityTypes; -@@ -126,6 +127,22 @@ public class CraftHumanEntity extends CraftLivingEntity implements HumanEntity { +@@ -127,6 +128,22 @@ public class CraftHumanEntity extends CraftLivingEntity implements HumanEntity { return getHandle().sleepTicks; } diff --git a/Spigot-Server-Patches/0567-Add-additional-open-container-api-to-HumanEntity.patch b/Spigot-Server-Patches/0567-Add-additional-open-container-api-to-HumanEntity.patch index 124ffd10e..467260a9f 100644 --- a/Spigot-Server-Patches/0567-Add-additional-open-container-api-to-HumanEntity.patch +++ b/Spigot-Server-Patches/0567-Add-additional-open-container-api-to-HumanEntity.patch @@ -5,10 +5,10 @@ Subject: [PATCH] Add additional open container api to HumanEntity diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftHumanEntity.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftHumanEntity.java -index 6fa61912cf9e4632bf4e11bd252aa26100f27531..f13abfc93f6dbb22abc55d836c43c613d07d4c20 100644 +index 4028f4bd87a183a808f4c9a19d51ee1c9b9e30f7..0a0e9df604723802fe65d871ff48aa9fd9b756bf 100644 --- a/src/main/java/org/bukkit/craftbukkit/entity/CraftHumanEntity.java +++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftHumanEntity.java -@@ -457,6 +457,70 @@ public class CraftHumanEntity extends CraftLivingEntity implements HumanEntity { +@@ -460,6 +460,70 @@ public class CraftHumanEntity extends CraftLivingEntity implements HumanEntity { return this.getHandle().activeContainer.getBukkitView(); } diff --git a/Spigot-Server-Patches/0637-Added-PlayerLecternPageChangeEvent.patch b/Spigot-Server-Patches/0637-Added-PlayerLecternPageChangeEvent.patch index 8e2dd9cf6..eb926aff5 100644 --- a/Spigot-Server-Patches/0637-Added-PlayerLecternPageChangeEvent.patch +++ b/Spigot-Server-Patches/0637-Added-PlayerLecternPageChangeEvent.patch @@ -17,10 +17,10 @@ index e7c29d194d5c3e3b1b79228758f7a3d8aa060fbd..9c6330da4e026a7753698b5d103c0097 ((ContainerProperty) this.d.get(i)).set(j); } diff --git a/src/main/java/net/minecraft/world/inventory/ContainerLectern.java b/src/main/java/net/minecraft/world/inventory/ContainerLectern.java -index 910c3eab0675b84694317427d7317caba89d74c3..10c829efd9ecb7dfa29e92586f99e40a8984f840 100644 +index 70d9ebca8d176d6483f104bd03598753811fc154..65687792351fbd561b1f4d6f88bc7288b6d8346f 100644 --- a/src/main/java/net/minecraft/world/inventory/ContainerLectern.java +++ b/src/main/java/net/minecraft/world/inventory/ContainerLectern.java -@@ -13,6 +13,7 @@ import org.bukkit.craftbukkit.inventory.CraftInventoryView; +@@ -14,6 +14,7 @@ import org.bukkit.craftbukkit.inventory.CraftInventoryView; import org.bukkit.entity.Player; import org.bukkit.event.player.PlayerTakeLecternBookEvent; // CraftBukkit end @@ -28,7 +28,7 @@ index 910c3eab0675b84694317427d7317caba89d74c3..10c829efd9ecb7dfa29e92586f99e40a public class ContainerLectern extends Container { -@@ -60,6 +61,7 @@ public class ContainerLectern extends Container { +@@ -61,6 +62,7 @@ public class ContainerLectern extends Container { @Override public boolean a(EntityHuman entityhuman, int i) { int j; @@ -36,7 +36,7 @@ index 910c3eab0675b84694317427d7317caba89d74c3..10c829efd9ecb7dfa29e92586f99e40a if (i >= 100) { j = i - 100; -@@ -69,11 +71,25 @@ public class ContainerLectern extends Container { +@@ -70,11 +72,25 @@ public class ContainerLectern extends Container { switch (i) { case 1: j = this.containerProperties.getProperty(0); diff --git a/Spigot-Server-Patches/0706-add-isDeeplySleeping-to-HumanEntity.patch b/Spigot-Server-Patches/0706-add-isDeeplySleeping-to-HumanEntity.patch index 620a99ada..fe93a5a26 100644 --- a/Spigot-Server-Patches/0706-add-isDeeplySleeping-to-HumanEntity.patch +++ b/Spigot-Server-Patches/0706-add-isDeeplySleeping-to-HumanEntity.patch @@ -5,10 +5,10 @@ Subject: [PATCH] add isDeeplySleeping to HumanEntity diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftHumanEntity.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftHumanEntity.java -index f13abfc93f6dbb22abc55d836c43c613d07d4c20..a5507f7907e211caff5c79650b26e116b0e64af2 100644 +index 0a0e9df604723802fe65d871ff48aa9fd9b756bf..6e28e0247200fbbc470ba317575f0c714f74d5bf 100644 --- a/src/main/java/org/bukkit/craftbukkit/entity/CraftHumanEntity.java +++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftHumanEntity.java -@@ -122,6 +122,13 @@ public class CraftHumanEntity extends CraftLivingEntity implements HumanEntity { +@@ -123,6 +123,13 @@ public class CraftHumanEntity extends CraftLivingEntity implements HumanEntity { } } diff --git a/work/CraftBukkit b/work/CraftBukkit index 591284349..a0149bf16 160000 --- a/work/CraftBukkit +++ b/work/CraftBukkit @@ -1 +1 @@ -Subproject commit 5912843493372e6d738711f2131cad9c48f746b4 +Subproject commit a0149bf16579fe48689a5051a39ff776913ee853