mirror of
https://github.com/PaperMC/Paper.git
synced 2025-01-24 01:06:01 +01:00
Allow cloning ItemStacks with unsafe enchantments. Fixes BUKKIT-621
Prevents "IllegalArgumentException: Specified enchantment cannot be applied to this itemstack"). By: mushroomhostage <mushroomhostage@yahoo.com>
This commit is contained in:
parent
b7a973b822
commit
e204abd0f0
1 changed files with 1 additions and 1 deletions
|
@ -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;
|
||||
}
|
||||
|
|
Loading…
Add table
Reference in a new issue