diff options
author | Celtic Minstrel <celtic.minstrel.ca@some.place> | 2012-03-13 21:46:00 -0400 |
---|---|---|
committer | EvilSeph <evilseph@gmail.com> | 2012-03-20 20:45:26 -0400 |
commit | 93732e21bc1b6de00438f2b42aaeb8251ad5fc71 (patch) | |
tree | 7c09c1897bd3259217b8ece9b0678a606a46cb97 /src/main | |
parent | 288662bfaefaa715cf34932b4ceb3ab4c8e5b310 (diff) | |
download | craftbukkit-93732e21bc1b6de00438f2b42aaeb8251ad5fc71.tar craftbukkit-93732e21bc1b6de00438f2b42aaeb8251ad5fc71.tar.gz craftbukkit-93732e21bc1b6de00438f2b42aaeb8251ad5fc71.tar.lz craftbukkit-93732e21bc1b6de00438f2b42aaeb8251ad5fc71.tar.xz craftbukkit-93732e21bc1b6de00438f2b42aaeb8251ad5fc71.zip |
[Bleeding] Fixed NullPointerException in InventoryView.setCursor() if you tried to empty the cursor by setting it to null. Fixes BUKKIT-1043
Diffstat (limited to 'src/main')
-rw-r--r-- | src/main/java/org/bukkit/craftbukkit/entity/CraftHumanEntity.java | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftHumanEntity.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftHumanEntity.java index 41fde2ed..e7beb2e6 100644 --- a/src/main/java/org/bukkit/craftbukkit/entity/CraftHumanEntity.java +++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftHumanEntity.java @@ -68,8 +68,8 @@ public class CraftHumanEntity extends CraftLivingEntity implements HumanEntity { } public void setItemOnCursor(ItemStack item) { - CraftItemStack stack = new CraftItemStack(item); - getHandle().inventory.setCarried(stack.getHandle()); + net.minecraft.server.ItemStack stack = CraftItemStack.createNMSItemStack(item); + getHandle().inventory.setCarried(stack); if (this instanceof CraftPlayer) { ((EntityPlayer) getHandle()).broadcastCarriedItem(); // Send set slot for cursor } |