diff options
author | Dinnerbone <dinnerbone@dinnerbone.com> | 2011-09-19 21:58:47 +0100 |
---|---|---|
committer | Dinnerbone <dinnerbone@dinnerbone.com> | 2011-09-19 21:58:47 +0100 |
commit | 5b68bae02e550f82f060946d05092ff900e354eb (patch) | |
tree | c00e2aa714ed904185f049d0d1435b6d50303f68 | |
parent | 914a8a0c047b0ec1d32c656101a234cdeabeedae (diff) | |
download | craftbukkit-5b68bae02e550f82f060946d05092ff900e354eb.tar craftbukkit-5b68bae02e550f82f060946d05092ff900e354eb.tar.gz craftbukkit-5b68bae02e550f82f060946d05092ff900e354eb.tar.lz craftbukkit-5b68bae02e550f82f060946d05092ff900e354eb.tar.xz craftbukkit-5b68bae02e550f82f060946d05092ff900e354eb.zip |
Fixed NPE when people experience the chest crash
-rw-r--r-- | src/main/java/net/minecraft/server/TileEntityChest.java | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/src/main/java/net/minecraft/server/TileEntityChest.java b/src/main/java/net/minecraft/server/TileEntityChest.java index 4e03b295..0616be18 100644 --- a/src/main/java/net/minecraft/server/TileEntityChest.java +++ b/src/main/java/net/minecraft/server/TileEntityChest.java @@ -159,7 +159,11 @@ public class TileEntityChest extends TileEntity implements IInventory { if (entity instanceof TileEntityChest) { return (TileEntityChest)entity; } else { - world.getServer().getLogger().severe("Block at " + x + "," + y + "," + z + " is a chest but has a " + entity.getClass().getName()); + String name = "null"; + if (entity != null) { + name = entity.toString(); + } + world.getServer().getLogger().severe("Block at " + x + "," + y + "," + z + " is a chest but has a " + name); return null; } } |