Class ToolEnchantment

  • Direct Known Subclasses:
    HoeEnchantment

    public abstract class ToolEnchantment
    extends ItemEnchantment
    Superclass of any enchantment having to do with a tool
    • Method Detail

      • applicableTo

        public String applicableTo()
        Description copied from class: Enchantment
        Returns a string that describes what types of items the enchantment can be applied to (e.g. "weapons and tools")
        Overrides:
        applicableTo in class ItemEnchantment
        Returns:
        a string that describes what types of items the enchantment can be applied to
      • canEnchant

        public boolean canEnchant​(ItemStack item)
        Description copied from class: Enchantment
        Returns a boolean that is true when an item can be enchanted, false when the item cannot be
        Overrides:
        canEnchant in class ItemEnchantment
        Parameters:
        item - the item you wish to check
        Returns:
        a boolean that is true when an item can be enchanted, false when the item cannot be