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);