diff options
author | Dinnerbone <dinnerbone@dinnerbone.com> | 2011-03-09 16:58:31 +0000 |
---|---|---|
committer | Dinnerbone <dinnerbone@dinnerbone.com> | 2011-03-09 16:58:31 +0000 |
commit | f056fad7657a7d2dd6cbb6379cc3492ea7b08244 (patch) | |
tree | fe6f2b4ac283c7b69462add6984cce103071ea5e | |
parent | 63f0de51282d7e0768001d6a9fd3a7f39b0e30b2 (diff) | |
download | craftbukkit-f056fad7657a7d2dd6cbb6379cc3492ea7b08244.tar craftbukkit-f056fad7657a7d2dd6cbb6379cc3492ea7b08244.tar.gz craftbukkit-f056fad7657a7d2dd6cbb6379cc3492ea7b08244.tar.lz craftbukkit-f056fad7657a7d2dd6cbb6379cc3492ea7b08244.tar.xz craftbukkit-f056fad7657a7d2dd6cbb6379cc3492ea7b08244.zip |
Fixed crash with bad holding slot
-rw-r--r-- | src/main/java/net/minecraft/server/InventoryPlayer.java | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/src/main/java/net/minecraft/server/InventoryPlayer.java b/src/main/java/net/minecraft/server/InventoryPlayer.java index 30d3ca26..0ad40a0e 100644 --- a/src/main/java/net/minecraft/server/InventoryPlayer.java +++ b/src/main/java/net/minecraft/server/InventoryPlayer.java @@ -24,7 +24,11 @@ public class InventoryPlayer implements IInventory { } public ItemStack b() { - return this.a[this.c]; + if (this.c < this.a.length) { + return this.a[this.c]; + } else { + return null; + } } private int d(int i) { |