Skip to content

Commit

Permalink
Don't use directly field's from EnchantmentLevelPair record.
Browse files Browse the repository at this point in the history
  • Loading branch information
vLuckyyy committed Oct 14, 2024
1 parent 032dad7 commit c4d40cf
Showing 1 changed file with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -91,8 +91,8 @@ private void giveItemStack(
ItemBuilder itemBuilder = ItemBuilder.from(material).amount(amount);

enchantmentLevel.ifPresent(pair -> {
if (pair.level > 0) {
itemBuilder.enchant(pair.enchantment, pair.level);
if (pair.level() > 0) {
itemBuilder.enchant(pair.enchantment, pair.level());
}
});

Expand Down

0 comments on commit c4d40cf

Please sign in to comment.