Closes #452. Enchantments are re-added to the item.

This commit is contained in:
cmastudios 2012-04-28 17:36:50 -05:00 committed by taoneill
parent 1d6fdbe126
commit 380025f147

View File

@ -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);