From 52416316cb99f91ae6357abfa5d8c94f1d4238bd Mon Sep 17 00:00:00 2001 From: CraftBukkit/Spigot Date: Sat, 14 Jan 2012 12:46:23 +0000 Subject: [PATCH] Additional commit to fix #BUKKIT-24 By: Nathan Adams --- .../org/bukkit/craftbukkit/inventory/CraftItemStack.java | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) 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 b1bde111a9..5e98c9d442 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 @@ -203,7 +203,11 @@ public class CraftItemStack extends ItemStack { list.add(subtag); } - tag.set("ench", list); + if (enchantments.isEmpty()) { + tag.remove("ench"); + } else { + tag.set("ench", list); + } } public net.minecraft.server.ItemStack getHandle() {