mirror of
https://hub.spigotmc.org/stash/scm/spigot/bukkit.git
synced 2025-08-21 05:44:17 +00:00
Allow cloning ItemStacks with unsafe enchantments. Fixes BUKKIT-621
Prevents "IllegalArgumentException: Specified enchantment cannot be applied to this itemstack").
This commit is contained in:
parent
e675ff791d
commit
a1a3f7ffba
1 changed files with 1 additions and 1 deletions
|
@ -211,7 +211,7 @@ public class ItemStack implements ConfigurationSerializable {
|
||||||
@Override
|
@Override
|
||||||
public ItemStack clone() {
|
public ItemStack clone() {
|
||||||
ItemStack result = new ItemStack(type, amount, durability);
|
ItemStack result = new ItemStack(type, amount, durability);
|
||||||
result.addEnchantments(getEnchantments());
|
result.addUnsafeEnchantments(getEnchantments());
|
||||||
|
|
||||||
return result;
|
return result;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Reference in a new issue