From 85a119a1721ff90e7bbf92e84fc750f07e70f04c Mon Sep 17 00:00:00 2001 From: CraftBukkit/Spigot Date: Mon, 2 Jan 2017 10:04:19 +1100 Subject: [PATCH] SPIGOT-2977: Pass setAmount(0) through to wrapped ItemStack. This class needs to be rewritten with more consistent semantics and alignment with Minecraft losing null, but that is probably a job for 1.12 By: md_5 --- .../java/org/bukkit/craftbukkit/inventory/CraftItemStack.java | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/paper-server/src/main/java/org/bukkit/craftbukkit/inventory/CraftItemStack.java b/paper-server/src/main/java/org/bukkit/craftbukkit/inventory/CraftItemStack.java index 8ed4b4bd3..f12b67be4 100644 --- a/paper-server/src/main/java/org/bukkit/craftbukkit/inventory/CraftItemStack.java +++ b/paper-server/src/main/java/org/bukkit/craftbukkit/inventory/CraftItemStack.java @@ -147,10 +147,10 @@ public final class CraftItemStack extends ItemStack { if (handle == null) { return; } + + handle.setCount(amount); if (amount == 0) { handle = null; - } else { - handle.setCount(amount); } }