Allow cloning ItemStacks with unsafe enchantments. Fixes BUKKIT-621

Prevents "IllegalArgumentException: Specified enchantment cannot be applied to this itemstack").
This commit is contained in:
mushroomhostage 2012-02-10 17:53:22 -08:00 committed by EvilSeph
parent e675ff791d
commit a1a3f7ffba

View File

@ -211,7 +211,7 @@ public class ItemStack implements ConfigurationSerializable {
@Override
public ItemStack clone() {
ItemStack result = new ItemStack(type, amount, durability);
result.addEnchantments(getEnchantments());
result.addUnsafeEnchantments(getEnchantments());
return result;
}