From a339310c48548f0f82f923ff3f5fe2cdc7a8e8ba Mon Sep 17 00:00:00 2001 From: SydMontague Date: Sun, 27 Sep 2020 11:47:50 +1000 Subject: [PATCH] #755: Fix NPE when calling getInventory() for virtual EnderChests --- nms-patches/InventoryEnderChest.patch | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/nms-patches/InventoryEnderChest.patch b/nms-patches/InventoryEnderChest.patch index 9e6816be1..13625b306 100644 --- a/nms-patches/InventoryEnderChest.patch +++ b/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() {