mirror of
https://github.com/taoneill/war.git
synced 2025-03-11 14:09:57 +01:00
Closes #452. Enchantments are re-added to the item.
This commit is contained in:
parent
1d6fdbe126
commit
380025f147
@ -230,6 +230,7 @@ public class WarPlayerListener implements Listener {
|
||||
if (inHand != null) {
|
||||
ItemStack newItemInHand = new ItemStack(inHand.getType(), inHand.getAmount(), inHand.getDurability(), inHand.getData().getData());
|
||||
newItemInHand.setDurability(inHand.getDurability());
|
||||
newItemInHand.addEnchantments(inHand.getEnchantments());
|
||||
event.getPlayer().setItemInHand(newItemInHand);
|
||||
event.setCancelled(true);
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user