3
0
Mirror von https://github.com/PaperMC/Paper.git synchronisiert 2024-12-19 04:50:06 +01:00

Fixed NPE when people experience the chest crash

Dieser Commit ist enthalten in:
Dinnerbone 2011-09-19 21:58:47 +01:00
Ursprung 914a8a0c04
Commit 5b68bae02e

Datei anzeigen

@ -159,7 +159,11 @@ public class TileEntityChest extends TileEntity implements IInventory {
if (entity instanceof TileEntityChest) { if (entity instanceof TileEntityChest) {
return (TileEntityChest)entity; return (TileEntityChest)entity;
} else { } 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; return null;
} }
} }