diff options
author | Tahg <tahgtahv@gmail.com> | 2011-04-06 12:45:03 -0400 |
---|---|---|
committer | Tahg <tahgtahv@gmail.com> | 2011-04-06 12:45:03 -0400 |
commit | 92e3957a0ec9812cd05f8e62149a36923fb8ca46 (patch) | |
tree | 24528eed441bfd2bb7a082cfa665e2052606890d /src/main/java/org | |
parent | 8385b1436ec0bdf89bae8d4d745f5355a08069ca (diff) | |
download | craftbukkit-92e3957a0ec9812cd05f8e62149a36923fb8ca46.tar craftbukkit-92e3957a0ec9812cd05f8e62149a36923fb8ca46.tar.gz craftbukkit-92e3957a0ec9812cd05f8e62149a36923fb8ca46.tar.lz craftbukkit-92e3957a0ec9812cd05f8e62149a36923fb8ca46.tar.xz craftbukkit-92e3957a0ec9812cd05f8e62149a36923fb8ca46.zip |
getContents now returns null for items whose underlying item is null
Diffstat (limited to 'src/main/java/org')
-rw-r--r-- | src/main/java/org/bukkit/craftbukkit/inventory/CraftInventory.java | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/main/java/org/bukkit/craftbukkit/inventory/CraftInventory.java b/src/main/java/org/bukkit/craftbukkit/inventory/CraftInventory.java index a54b7956..822a250f 100644 --- a/src/main/java/org/bukkit/craftbukkit/inventory/CraftInventory.java +++ b/src/main/java/org/bukkit/craftbukkit/inventory/CraftInventory.java @@ -35,7 +35,7 @@ public class CraftInventory implements org.bukkit.inventory.Inventory { net.minecraft.server.ItemStack[] mcItems = getInventory().getContents(); for (int i = 0; i < mcItems.length; i++ ) { - items[i] = new CraftItemStack(mcItems[i]); + items[i] = mcItems[i] == null ? null : new CraftItemStack(mcItems[i]); } return items; |