From 0920dec75a951da73678f8cb7d0ea130c690d5c7 Mon Sep 17 00:00:00 2001 From: CraftBukkit/Spigot Date: Sun, 27 Sep 2020 11:47:50 +1000 Subject: [PATCH] #755: Fix NPE when calling getInventory() for virtual EnderChests By: SydMontague --- paper-server/nms-patches/InventoryEnderChest.patch | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/paper-server/nms-patches/InventoryEnderChest.patch b/paper-server/nms-patches/InventoryEnderChest.patch index 9e6816be1d..13625b3062 100644 --- a/paper-server/nms-patches/InventoryEnderChest.patch +++ b/paper-server/nms-patches/InventoryEnderChest.patch @@ -18,7 +18,7 @@ + + @Override + public Location getLocation() { -+ return new Location(this.a.getWorld().getWorld(), this.a.getPosition().getX(), this.a.getPosition().getY(), this.a.getPosition().getZ()); ++ return this.a != null ? new Location(this.a.getWorld().getWorld(), this.a.getPosition().getX(), this.a.getPosition().getY(), this.a.getPosition().getZ()) : null; + } - public InventoryEnderChest() {