Class Enchantments

java.lang.Object
studio.magemonkey.fabled.enchants.api.Enchantments

public class Enchantments extends Object
FabledEnchants © 2026 VoidEdge api.studio.magemonkey.fabled.enchants.Enchantments
  • Constructor Details

    • Enchantments

      public Enchantments()
  • Method Details

    • getEnchantments

      public static Map<CustomEnchantment,Integer> getEnchantments(org.bukkit.entity.Player player)
      Parameters:
      player - player to get enchantments for
      Returns:
      combined enchantments on all active equipment the player has
    • getEquipmentData

      public static PlayerEquips getEquipmentData(org.bukkit.entity.Player player)
      Parameters:
      player - player to get equipment data for
      Returns:
      the equipment data tracking the player's enchantments
    • clearEquipmentData

      public static void clearEquipmentData(org.bukkit.entity.Player player)
      Parameters:
      player - player to clear equipment data for (will refresh next access)
    • clearAllEquipmentData

      public static void clearAllEquipmentData()
      Clears equipment data for all players, forcing all equipment to refresh
    • getCustomEnchantments

      public static Map<CustomEnchantment,Integer> getCustomEnchantments(org.bukkit.inventory.ItemStack item)
      Parameters:
      item - item to grab the enchantments from
      Returns:
      list of custom enchantments (does not include vanilla enchantments)
    • getAllEnchantments

      public static Map<CustomEnchantment,Integer> getAllEnchantments(org.bukkit.inventory.ItemStack item)
      Gets all enchantments on an item, including vanilla enchantments. This wraps vanilla enchantments in the CustomEnchantment class for more visibility on their settings.
      Parameters:
      item - item to get enchantments for.
      Returns:
      all enchantments on the item and their levels
    • hasCustomEnchantment

      public static boolean hasCustomEnchantment(org.bukkit.inventory.ItemStack item, String enchantmentName)
      Checks whether the item has the enchantment on it
      Parameters:
      item - item to check
      enchantmentName - name of the enchantment to check for
      Returns:
      true if it has the enchantment, false otherwise
    • removeAllEnchantments

      public static org.bukkit.inventory.ItemStack removeAllEnchantments(org.bukkit.inventory.ItemStack item)
      Removes all enchantments from the item, including vanilla enchantments
      Parameters:
      item - item to remove all enchantments from
      Returns:
      item with all enchantments removed
    • removeCustomEnchantments

      public static org.bukkit.inventory.ItemStack removeCustomEnchantments(org.bukkit.inventory.ItemStack item)
      Removes all custom enchantments from an item
      Parameters:
      item - item to remove enchantments from
      Returns:
      item without custom enchantments