From 3ee8a2372c150b912ed7b6a4347efd3275942d19 Mon Sep 17 00:00:00 2001 From: Nathan Adams Date: Sat, 14 Jan 2012 12:46:23 +0000 Subject: [PATCH] Additional commit to fix #BUKKIT-24 --- .../org/bukkit/craftbukkit/inventory/CraftItemStack.java | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/src/main/java/org/bukkit/craftbukkit/inventory/CraftItemStack.java b/src/main/java/org/bukkit/craftbukkit/inventory/CraftItemStack.java index b1bde111a9..5e98c9d442 100644 --- a/src/main/java/org/bukkit/craftbukkit/inventory/CraftItemStack.java +++ b/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() {