From 256d4ba5550178b943f36f45c3e3fe38ea9069d3 Mon Sep 17 00:00:00 2001 From: Nathan Adams Date: Sat, 26 Nov 2011 01:01:43 +0000 Subject: [PATCH] Fixed the NPE in inventoryplayer once again, thanks to don4of4 --- src/main/java/net/minecraft/server/InventoryPlayer.java | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/src/main/java/net/minecraft/server/InventoryPlayer.java b/src/main/java/net/minecraft/server/InventoryPlayer.java index 0626a81034..b327c58dd1 100644 --- a/src/main/java/net/minecraft/server/InventoryPlayer.java +++ b/src/main/java/net/minecraft/server/InventoryPlayer.java @@ -312,7 +312,13 @@ public class InventoryPlayer implements IInventory { } public boolean b(Block block) { - if (block != null && block.material.k()) { // CraftBukkit - fix NPE + // CraftBukkit start - fixed NPE + if (block == null) { + return false; + } + // CraftBukkit end + + if (block.material.k()) { return true; } else { ItemStack itemstack = this.getItem(this.itemInHandIndex);