Skip to content

Commit

Permalink
Better is Book Check
Browse files Browse the repository at this point in the history
  • Loading branch information
TrueDarkLord committed Mar 23, 2024
1 parent 7c86631 commit aa6f6d7
Showing 1 changed file with 5 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -26,9 +26,11 @@ public BlackSmithResult(Player player, ItemStack mainItem, ItemStack subItem) {
Starter starter = plugin.getStarter();

EnchantmentBookSettings enchantmentBookSettings = starter.getEnchantmentBookSettings();
if (mainItem.getType() == enchantmentBookSettings.getNormalBook().getMaterial() && subItem.getType() == enchantmentBookSettings.getNormalBook().getMaterial()) {
CEBook mainBook = enchantmentBookSettings.getCEBook(mainItem);
CEBook subBook = enchantmentBookSettings.getCEBook(subItem);

CEBook mainBook = enchantmentBookSettings.getCEBook(mainItem);
CEBook subBook = enchantmentBookSettings.getCEBook(subItem);

if (mainBook != null && subBook != null) {
// Books are the same enchantment.
if (mainBook.getEnchantment() == subBook.getEnchantment() &&
// Books have to be the same level.
Expand Down

0 comments on commit aa6f6d7

Please sign in to comment.