Skip to content

Commit

Permalink
Remove pre-existing enchantments properly
Browse files Browse the repository at this point in the history
  • Loading branch information
mcmonkey4eva committed May 14, 2017
1 parent 13015cd commit e3991c6
Showing 1 changed file with 1 addition and 0 deletions.
Expand Up @@ -161,6 +161,7 @@ public void onItemEnchanted(EnchantItemEvent event) {
event.setCancelled(cancelled);
event.setExpLevelCost(cost);
if (itemEdited) {
event.getEnchantsToAdd().clear();
event.getItem().setItemMeta(item.getItemStack().getItemMeta());
}
}
Expand Down

0 comments on commit e3991c6

Please sign in to comment.