Skip to content
This repository has been archived by the owner on Sep 9, 2024. It is now read-only.

Commit

Permalink
Fix duplication bug
Browse files Browse the repository at this point in the history
Resolves #5
  • Loading branch information
Puyodead1 committed Oct 10, 2021
1 parent 2fdc2e1 commit c47dbb5
Showing 1 changed file with 0 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -140,7 +140,6 @@ public void crystalUse(InventoryClickEvent e) {
// check if the enchant conflicts with any of the existing enchants
if (currentEntry.getKey().conflictsWith(enchantment)) {
refuseConflict(player, enchantment, currentEntry);
continue;
}
}

Expand Down Expand Up @@ -170,10 +169,6 @@ public void crystalUse(InventoryClickEvent e) {
apply(player, currentItem, clone, enchantment, clone.getEnchantmentLevel(enchantment));
}

if (!clone.getEnchantments().isEmpty()) {
player.getInventory().addItem(clone);
}

if (clone.getEnchantments().size() == enchantAmount) {
// no enchants were added to the item
e.setCancelled(false);
Expand Down

0 comments on commit c47dbb5

Please sign in to comment.