diff --git a/paper-server/patches/sources/net/minecraft/world/inventory/PlayerEnderChestContainer.java.patch b/paper-server/patches/sources/net/minecraft/world/inventory/PlayerEnderChestContainer.java.patch index c30aff9c1..7c26930d5 100644 --- a/paper-server/patches/sources/net/minecraft/world/inventory/PlayerEnderChestContainer.java.patch +++ b/paper-server/patches/sources/net/minecraft/world/inventory/PlayerEnderChestContainer.java.patch @@ -1,27 +1,20 @@ --- a/net/minecraft/world/inventory/PlayerEnderChestContainer.java +++ b/net/minecraft/world/inventory/PlayerEnderChestContainer.java -@@ -12,9 +_,22 @@ - public class PlayerEnderChestContainer extends SimpleContainer { +@@ -13,8 +_,15 @@ @Nullable private EnderChestBlockEntity activeChest; -- + - public PlayerEnderChestContainer() { -+ // CraftBukkit start -+ private final Player owner; -+ -+ public org.bukkit.inventory.InventoryHolder getBukkitOwner() { -+ return this.owner.getBukkitEntity(); -+ } -+ +- super(27); ++ // Paper start + @Override + public @Nullable org.bukkit.Location getLocation() { + return this.activeChest != null ? org.bukkit.craftbukkit.util.CraftLocation.toBukkit(this.activeChest.getBlockPos(), this.activeChest.getLevel().getWorld()) : null; + } + + public PlayerEnderChestContainer(Player owner) { - super(27); -+ this.owner = owner; -+ // CraftBukkit end ++ super(27, owner.getBukkitEntity()); ++ // Paper end } public void setActiveChest(EnderChestBlockEntity enderChestBlockEntity) {