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.
-
Nested Class Summary
Nested classes/interfaces inherited from class java.lang.Enum
Enum.EnumDesc<E extends Enum<E>> -
Enum Constant Summary
Enum ConstantsEnum ConstantDescriptionFired when a spell is discovered by casting it (e.g., from a wand or scroll).Fired when a spell is discovered via a command.Fired when a spell is discovered using an Identification Scroll on an undiscovered spell scroll or book.Fired when a spell is discovered through other miscellaneous means.Fired when a spell is discovered by purchasing a spell book from a Wizard. -
Method Summary
Modifier and TypeMethodDescriptionstatic DiscoverSpellEvent.SourcesFinds a built-in source enum value by its name.getName()Gets the unique name of this discovery source.static DiscoverSpellEvent.SourcesReturns the enum constant of this class with the specified name.static DiscoverSpellEvent.Sources[]values()Returns an array containing the constants of this enum class, in the order they are declared.
-
Enum Constant Details
-
CASTING
Fired when a spell is discovered by casting it (e.g., from a wand or scroll). -
IDENTIFICATION_SCROLL
Fired when a spell is discovered using an Identification Scroll on an undiscovered spell scroll or book. -
COMMAND
Fired when a spell is discovered via a command. (/discover) -
PURCHASE
Fired when a spell is discovered by purchasing a spell book from a Wizard. -
OTHER
Fired when a spell is discovered through other miscellaneous means.
-
-
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
-
byName
Finds a built-in source enum value by its name.- Parameters:
name- The name of the source (case-sensitive).- Returns:
- The matching
DiscoverSpellEvent.Sourcesvalue, ornullif no match is found.
-
getName
Description copied from interface:DiscoverSpellEvent.SourceGets the unique name of this discovery source.- Specified by:
getNamein interfaceDiscoverSpellEvent.Source- Returns:
- The name string.
-