Enum Class ItemEnchantmentType

java.lang.Object
java.lang.Enum<ItemEnchantmentType>
net.pottercraft.ollivanders2.item.enchantment.ItemEnchantmentType
All Implemented Interfaces:
Serializable, Comparable<ItemEnchantmentType>, Constable

public enum ItemEnchantmentType extends Enum<ItemEnchantmentType>
Enumeration of all available item enchantments in Ollivanders2.

Each enchantment type defines a distinct magical effect that can be applied to items. Enchantments are characterized by their display name, implementation class, optional item lore, magic level (for counter-spell balancing), and whether they are curses or beneficial effects.

Enchantments are dynamically instantiated via reflection using the className field. The level field indicates the difficulty/power of the enchantment and is used to balance counter-spells against them. Cursed enchantments (isCursed()) represent negative effects, while non-cursed enchantments are beneficial or neutral magical effects.

See Also:
  • Enum Constant Details

    • CELATUM

      public static final ItemEnchantmentType CELATUM
      Concealment enchantment that hides text in a book.

      CELATUM is a beginner-level beneficial enchantment that hides text in a book.

    • FLAGRANTE

      public static final ItemEnchantmentType FLAGRANTE
      Flagrante curse that burns whoever touches it.

      FLAGRANTE is an expert-level curse that applies continuous burning damage to players holding flagrante-cursed items. Cursed items cannot be picked up by block inventories.

    • GEMINO

      public static final ItemEnchantmentType GEMINO
      Duplication curse that spawns duplicates of items.

      GEMINO is an expert-level curse that duplicates items when certain conditions are met, potentially filling containers and overwhelming the player with copies.

    • PORTUS

      public static final ItemEnchantmentType PORTUS
      Portkey enchantment that teleports the holder to a destination.

      PORTUS is a NEWT-level beneficial enchantment that allows a player holding the item to be teleported to a configured destination point.

    • VOLATUS

      public static final ItemEnchantmentType VOLATUS
      Flight enchantment that enables broom-based flight.

      VOLATUS is an expert-level beneficial enchantment applied to broomsticks that grants the player flight capability while holding the broom. Broomsticks with this enchantment persist in the world and cannot be picked up by hoppers.

  • Method Details

    • values

      public static ItemEnchantmentType[] values()
      Returns an array containing the constants of this enum class, in the order they are declared.
      Returns:
      an array containing the constants of this enum class, in the order they are declared
    • valueOf

      public static ItemEnchantmentType valueOf(String name)
      Returns the enum constant of this class with the specified name. The string must match exactly an identifier used to declare an enum constant in this class. (Extraneous whitespace characters are not permitted.)
      Parameters:
      name - the name of the enum constant to be returned.
      Returns:
      the enum constant with the specified name
      Throws:
      IllegalArgumentException - if this enum class has no constant with the specified name
      NullPointerException - if the argument is null
    • getName

      @NotNull public @NotNull String getName()
      Get the display name of this enchantment type.
      Returns:
      the display name (e.g., "volatus", "flagrante")
    • getClassName

      @NotNull public @NotNull Class<?> getClassName()
      Get the concrete implementation class for this enchantment.

      The returned class is used by reflection to instantiate enchantment objects with the signature (Ollivanders2, int, String, String).

      Returns:
      the Class object for the enchantment implementation
    • getLore

      @Nullable public @Nullable String getLore()
      Get the optional descriptive lore for this enchantment.

      If present, this lore text is appended to the display lore of enchanted items.

      Returns:
      the lore text, or null if no lore is defined
    • getLevel

      @NotNull public @NotNull MagicLevel getLevel()
      Get the magic difficulty level of this enchantment.

      Used to balance counter-spells and magical interactions against this enchantment.

      Returns:
      the MagicLevel (BEGINNER, NEWT, EXPERT, etc.)
    • isCursed

      public boolean isCursed()
      Check whether this enchantment is a curse or a beneficial effect.
      Returns:
      true if this is a curse, false if a beneficial or neutral enchantment