Fixed NPE in player inventory + don't ignore the cancel state of world unloads

This commit is contained in:
Nathan Adams committed 2011-11-24 20:27:16 +00:00
1 parent a7664a104f
commit e31cedf583
2 files changed
+2 -2

No files matched your search

@@ -312,7 +312,7 @@ public class InventoryPlayer implements IInventory {
}
public boolean b(Block block) {
if (block.material.k()) {
if (block != null && block.material.k()) { // CraftBukkit - fix NPE
return true;
} else {
ItemStack itemstack = this.getItem(this.itemInHandIndex);