Skip to content

Commit

Permalink
Hellforged Hands
Browse files Browse the repository at this point in the history
Make hellforged also work for items currently in the main and off hand.
  • Loading branch information
TrueDarkLord committed Feb 15, 2024
1 parent 34a64c9 commit f022576
Showing 1 changed file with 7 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -14,8 +14,10 @@
import org.bukkit.attribute.Attribute;
import org.bukkit.entity.Player;
import org.bukkit.inventory.ItemStack;
import org.bukkit.inventory.PlayerInventory;
import org.bukkit.potion.PotionEffect;
import org.bukkit.potion.PotionEffectType;
import org.jetbrains.annotations.NotNull;

import java.util.List;
import java.util.Map;
Expand Down Expand Up @@ -82,6 +84,11 @@ public void process(UUID playerId) {
}
useHellForge(player, armor, enchantments);
}

PlayerInventory inv = player.getInventory();

useHellForge(player, inv.getItemInMainHand(), enchantmentBookSettings.getEnchantments(inv.getItemInMainHand()));
useHellForge(player, inv.getItemInOffHand(), enchantmentBookSettings.getEnchantments(inv.getItemInOffHand()));
}

private void checkCommander(ItemStack armor, Player player, Map<CEnchantment, Integer> enchantments) {
Expand Down

0 comments on commit f022576

Please sign in to comment.