Enum Class SpellCondition.Type

java.lang.Object
java.lang.Enum<SpellCondition.Type>
com.binaris.wizardry.api.content.spell.SpellCondition.Type
All Implemented Interfaces:
Serializable, Comparable<SpellCondition.Type>, Constable
Enclosing class:
SpellCondition

public static enum SpellCondition.Type extends Enum<SpellCondition.Type>
  • Enum Constant Details

    • ELEMENT

      public static final SpellCondition.Type ELEMENT
      Condition based on the spell's element.
    • TIER

      public static final SpellCondition.Type TIER
      Condition based on the spell's tier.
    • SPELL_TYPE

      public static final SpellCondition.Type SPELL_TYPE
      Condition based on the spell's type.
    • SPELL

      public static final SpellCondition.Type SPELL
      Condition based on the specific spell.
  • Method Details

    • values

      public static SpellCondition.Type[] 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 SpellCondition.Type 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
    • key

      public String key()
      Converts the enum name to a lowercase string key without underscores. For example, SPELL_TYPE becomes "spelltype".
      Returns:
      the string key representation of this type.
    • fromKey

      @Nullable public static @Nullable SpellCondition.Type fromKey(String key)
      Parses a string key back to a SpellCondition.Type enum value.
      Parameters:
      key - the string key to parse.
      Returns:
      the corresponding SpellCondition.Type, or null if not found.