Enum Class ItemEnchantmentType
- All Implemented Interfaces:
Serializable,Comparable<ItemEnchantmentType>,Constable
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:
-
Nested Class Summary
Nested classes/interfaces inherited from class java.lang.Enum
Enum.EnumDesc<E extends Enum<E>> -
Enum Constant Summary
Enum ConstantsEnum ConstantDescriptionConcealment enchantment that hides text in a book.Flagrante curse that burns whoever touches it.Duplication curse that spawns duplicates of items.Portkey enchantment that teleports the holder to a destination.Flight enchantment that enables broom-based flight. -
Method Summary
Modifier and TypeMethodDescription@NotNull Class<?> Get the concrete implementation class for this enchantment.@NotNull MagicLevelgetLevel()Get the magic difficulty level of this enchantment.@Nullable StringgetLore()Get the optional descriptive lore for this enchantment.@NotNull StringgetName()Get the display name of this enchantment type.booleanisCursed()Check whether this enchantment is a curse or a beneficial effect.static ItemEnchantmentTypeReturns the enum constant of this class with the specified name.static ItemEnchantmentType[]values()Returns an array containing the constants of this enum class, in the order they are declared.
-
Enum Constant Details
-
CELATUM
Concealment enchantment that hides text in a book.CELATUMis a beginner-level beneficial enchantment that hides text in a book. -
FLAGRANTE
Flagrante curse that burns whoever touches it.FLAGRANTEis 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
Duplication curse that spawns duplicates of items.GEMINOis an expert-level curse that duplicates items when certain conditions are met, potentially filling containers and overwhelming the player with copies. -
PORTUS
Portkey enchantment that teleports the holder to a destination.PORTUSis a NEWT-level beneficial enchantment that allows a player holding the item to be teleported to a configured destination point. -
VOLATUS
Flight enchantment that enables broom-based flight.VOLATUSis 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
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
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 nameNullPointerException- if the argument is null
-
getName
Get the display name of this enchantment type.- Returns:
- the display name (e.g., "volatus", "flagrante")
-
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
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
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
-