diff --git a/Spigot-Server-Patches/Fix-NPE-when-getting-location-from-players-EnderChes.patch b/Spigot-Server-Patches/Fix-NPE-when-getting-location-from-InventoryEnderChe.patch similarity index 81% rename from Spigot-Server-Patches/Fix-NPE-when-getting-location-from-players-EnderChes.patch rename to Spigot-Server-Patches/Fix-NPE-when-getting-location-from-InventoryEnderChe.patch index 17e2616c77..6165793d77 100644 --- a/Spigot-Server-Patches/Fix-NPE-when-getting-location-from-players-EnderChes.patch +++ b/Spigot-Server-Patches/Fix-NPE-when-getting-location-from-InventoryEnderChe.patch @@ -1,11 +1,12 @@ From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001 From: Shane Freeder Date: Sat, 10 Mar 2018 13:03:49 +0000 -Subject: [PATCH] Fix NPE when getting location from players EnderChest +Subject: [PATCH] Fix NPE when getting location from InventoryEnderChest opened + by plugins diff --git a/src/main/java/net/minecraft/server/InventoryEnderChest.java b/src/main/java/net/minecraft/server/InventoryEnderChest.java -index cd7de2b53..85ad93d08 100644 +index cd7de2b53..37b494b78 100644 --- a/src/main/java/net/minecraft/server/InventoryEnderChest.java +++ b/src/main/java/net/minecraft/server/InventoryEnderChest.java @@ -0,0 +0,0 @@ import org.bukkit.inventory.InventoryHolder; @@ -21,7 +22,7 @@ index cd7de2b53..85ad93d08 100644 @Override public Location getLocation() { -+ if (getTileEntity() == null) return owner.getBukkitEntity().getLocation(); // Paper - return Player location if there is no TE ++ if (getTileEntity() == null) return null; // Paper - return null if there is no TE bound (opened by plugin) return new Location(this.a.getWorld().getWorld(), this.a.getPosition().getX(), this.a.getPosition().getY(), this.a.getPosition().getZ()); }