From e5200322051f0a4905012b08474b9225585f3e12 Mon Sep 17 00:00:00 2001 From: feildmaster Date: Thu, 31 May 2012 10:15:00 -0500 Subject: [PATCH] Further improving ItemStack handling --- src/main/java/net/minecraft/server/PlayerInventory.java | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/src/main/java/net/minecraft/server/PlayerInventory.java b/src/main/java/net/minecraft/server/PlayerInventory.java index d01be1e191..df502e8839 100644 --- a/src/main/java/net/minecraft/server/PlayerInventory.java +++ b/src/main/java/net/minecraft/server/PlayerInventory.java @@ -439,6 +439,11 @@ public class PlayerInventory implements IInventory { } public ItemStack getCarried() { + // CraftBukkit start + if (this.f != null && this.f.count == 0) { + this.setCarried(null); + } + // CraftBukkit end return this.f; }