Enum Class DiscoverSpellEvent.Sources

java.lang.Object
java.lang.Enum<DiscoverSpellEvent.Sources>
com.binaris.wizardry.api.content.event.DiscoverSpellEvent.Sources
All Implemented Interfaces:
DiscoverSpellEvent.Source, Serializable, Comparable<DiscoverSpellEvent.Sources>, Constable
Enclosing class:
DiscoverSpellEvent

public static enum DiscoverSpellEvent.Sources extends Enum<DiscoverSpellEvent.Sources> implements DiscoverSpellEvent.Source
Built-in sources of spell discovery.
  • Enum Constant Details

    • CASTING

      public static final DiscoverSpellEvent.Sources CASTING
      Fired when a spell is discovered by casting it (e.g., from a wand or scroll).
    • IDENTIFICATION_SCROLL

      public static final DiscoverSpellEvent.Sources IDENTIFICATION_SCROLL
      Fired when a spell is discovered using an Identification Scroll on an undiscovered spell scroll or book.
    • COMMAND

      public static final DiscoverSpellEvent.Sources COMMAND
      Fired when a spell is discovered via a command. (/discover)
    • PURCHASE

      public static final DiscoverSpellEvent.Sources PURCHASE
      Fired when a spell is discovered by purchasing a spell book from a Wizard.
    • OTHER

      public static final DiscoverSpellEvent.Sources OTHER
      Fired when a spell is discovered through other miscellaneous means.
  • Method Details

    • values

      public static DiscoverSpellEvent.Sources[] 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 DiscoverSpellEvent.Sources 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
    • byName

      @Nullable public static DiscoverSpellEvent.Sources byName(String name)
      Finds a built-in source enum value by its name.
      Parameters:
      name - The name of the source (case-sensitive).
      Returns:
      The matching DiscoverSpellEvent.Sources value, or null if no match is found.
    • getName

      public String getName()
      Description copied from interface: DiscoverSpellEvent.Source
      Gets the unique name of this discovery source.
      Specified by:
      getName in interface DiscoverSpellEvent.Source
      Returns:
      The name string.