summaryrefslogtreecommitdiffstats
path: root/src/main/java/net/minecraft/server
diff options
context:
space:
mode:
authorNathan Adams <dinnerbone@dinnerbone.com>2011-11-24 20:27:16 +0000
committerNathan Adams <dinnerbone@dinnerbone.com>2011-11-24 20:27:16 +0000
commite31cedf583a4091b6bfc7f5832452e9d97472174 (patch)
tree14d0c46c1837505916b3892c78960d96b6ca6bf7 /src/main/java/net/minecraft/server
parenta7664a104fa9fb206921e9245303579b1360f5c0 (diff)
downloadcraftbukkit-e31cedf583a4091b6bfc7f5832452e9d97472174.tar
craftbukkit-e31cedf583a4091b6bfc7f5832452e9d97472174.tar.gz
craftbukkit-e31cedf583a4091b6bfc7f5832452e9d97472174.tar.lz
craftbukkit-e31cedf583a4091b6bfc7f5832452e9d97472174.tar.xz
craftbukkit-e31cedf583a4091b6bfc7f5832452e9d97472174.zip
Fixed NPE in player inventory + don't ignore the cancel state of world unloads
Diffstat (limited to 'src/main/java/net/minecraft/server')
-rw-r--r--src/main/java/net/minecraft/server/InventoryPlayer.java2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/main/java/net/minecraft/server/InventoryPlayer.java b/src/main/java/net/minecraft/server/InventoryPlayer.java
index ef395e3a..0626a810 100644
--- a/src/main/java/net/minecraft/server/InventoryPlayer.java
+++ b/src/main/java/net/minecraft/server/InventoryPlayer.java
@@ -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);