Skip to content

Commit

Permalink
Fixed enchantment being added regardless of setting
Browse files Browse the repository at this point in the history
  • Loading branch information
KartoffelChipss authored May 3, 2024
1 parent f95914a commit 3dfdbcc
Showing 1 changed file with 2 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -65,6 +65,8 @@ public CustomItem setUnbreakable(boolean unbreakable) {
}

public CustomItem setEnchanted(boolean enchanted) {
if (!enchanted) return this;

ItemMeta itemMeta = itemStack.getItemMeta();
itemMeta.addItemFlags(ItemFlag.HIDE_ENCHANTS);
itemMeta.addEnchant(Enchantment.DURABILITY, 1, true);
Expand Down

0 comments on commit 3dfdbcc

Please sign in to comment.