diff options
Diffstat (limited to 'src')
-rw-r--r-- | src/main/java/org/bukkit/craftbukkit/inventory/InventoryWrapper.java | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/src/main/java/org/bukkit/craftbukkit/inventory/InventoryWrapper.java b/src/main/java/org/bukkit/craftbukkit/inventory/InventoryWrapper.java index d2a00849..6cbcc9d3 100644 --- a/src/main/java/org/bukkit/craftbukkit/inventory/InventoryWrapper.java +++ b/src/main/java/org/bukkit/craftbukkit/inventory/InventoryWrapper.java @@ -39,11 +39,11 @@ public class InventoryWrapper implements IInventory { // Copied from CraftItemStack ItemStack stack = getItem(i); ItemStack result; - if (stack == null) { - return null; + if (stack.isEmpty()) { + return stack; } if (stack.getCount() <= j) { - this.setItem(i, null); + this.setItem(i, ItemStack.a); result = stack; } else { result = CraftItemStack.copyNMSStack(stack, j); @@ -58,11 +58,11 @@ public class InventoryWrapper implements IInventory { // Copied from CraftItemStack ItemStack stack = getItem(i); ItemStack result; - if (stack == null) { - return null; + if (stack.isEmpty()) { + return stack; } if (stack.getCount() <= 1) { - this.setItem(i, null); + this.setItem(i, ItemStack.a); result = stack; } else { result = CraftItemStack.copyNMSStack(stack, 1); |