diff options
author | Nathan Adams <dinnerbone@dinnerbone.com> | 2011-11-26 01:01:43 +0000 |
---|---|---|
committer | Nathan Adams <dinnerbone@dinnerbone.com> | 2011-11-26 01:01:43 +0000 |
commit | 256d4ba5550178b943f36f45c3e3fe38ea9069d3 (patch) | |
tree | bd711344da5d592a1d0f65222588d350631bb101 | |
parent | 8062d5c7bee9e37cb48956b90bc8e9967ee85c8e (diff) | |
download | craftbukkit-256d4ba5550178b943f36f45c3e3fe38ea9069d3.tar craftbukkit-256d4ba5550178b943f36f45c3e3fe38ea9069d3.tar.gz craftbukkit-256d4ba5550178b943f36f45c3e3fe38ea9069d3.tar.lz craftbukkit-256d4ba5550178b943f36f45c3e3fe38ea9069d3.tar.xz craftbukkit-256d4ba5550178b943f36f45c3e3fe38ea9069d3.zip |
Fixed the NPE in inventoryplayer once again, thanks to don4of4
-rw-r--r-- | src/main/java/net/minecraft/server/InventoryPlayer.java | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/src/main/java/net/minecraft/server/InventoryPlayer.java b/src/main/java/net/minecraft/server/InventoryPlayer.java index 0626a810..b327c58d 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); |