diff options
author | mushroomhostage <mushroomhostage@yahoo.com> | 2012-02-10 17:53:22 -0800 |
---|---|---|
committer | EvilSeph <evilseph@gmail.com> | 2012-02-13 00:46:34 -0500 |
commit | a1a3f7ffbaff612c91d0e95abd5a40832c244c43 (patch) | |
tree | 24a1a7891a7d60bb846b4666b532388c66c774d4 /src/main/java | |
parent | e675ff791d0b0aad5d9724e165e2cbdbeae81366 (diff) | |
download | bukkit-a1a3f7ffbaff612c91d0e95abd5a40832c244c43.tar bukkit-a1a3f7ffbaff612c91d0e95abd5a40832c244c43.tar.gz bukkit-a1a3f7ffbaff612c91d0e95abd5a40832c244c43.tar.lz bukkit-a1a3f7ffbaff612c91d0e95abd5a40832c244c43.tar.xz bukkit-a1a3f7ffbaff612c91d0e95abd5a40832c244c43.zip |
Allow cloning ItemStacks with unsafe enchantments. Fixes BUKKIT-621
Prevents "IllegalArgumentException: Specified enchantment cannot be applied to this itemstack").
Diffstat (limited to 'src/main/java')
-rw-r--r-- | src/main/java/org/bukkit/inventory/ItemStack.java | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/main/java/org/bukkit/inventory/ItemStack.java b/src/main/java/org/bukkit/inventory/ItemStack.java index 95dc1f10..c730db62 100644 --- a/src/main/java/org/bukkit/inventory/ItemStack.java +++ b/src/main/java/org/bukkit/inventory/ItemStack.java @@ -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; } |