Package com.pixelmonmod.pixelmon.enums
Enum Class EnumEncounterMode
- All Implemented Interfaces:
Serializable
,Comparable<EnumEncounterMode>
,Constable
Modes for how often players can challenge NPC Trainers.
-
Nested Class Summary
Nested classes/interfaces inherited from class java.lang.Enum
Enum.EnumDesc<E extends Enum<E>>
-
Enum Constant Summary
-
Method Summary
Modifier and TypeMethodDescriptionstatic EnumEncounterMode
getFromIndex
(int i) Gets an encounter mode from its enum index.Gets the localized name of the encounter mode.static EnumEncounterMode
getNextMode
(EnumEncounterMode mode) Gets the next encounter mode in order from a current one.static boolean
hasEncounterMode
(String name) Checks if there is an encounter mode with a certain name.boolean
static EnumEncounterMode
Returns the enum constant of this class with the specified name.static EnumEncounterMode[]
values()
Returns an array containing the constants of this enum class, in the order they are declared.
-
Enum Constant Details
-
Once
-
OncePerPlayer
-
OncePerMCDay
-
OncePerDay
-
Unlimited
-
-
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
-
isTimedAccess
public boolean isTimedAccess() -
getFromIndex
Gets an encounter mode from its enum index.- Parameters:
i
- The index of the encounter mode.- Returns:
- The encounter mode with the specified index.
-
getNextMode
Gets the next encounter mode in order from a current one.- Parameters:
mode
- The current encounter mode.- Returns:
- The next encounter mode in order.
-
hasEncounterMode
Checks if there is an encounter mode with a certain name.- Parameters:
name
- The name of the encounter mode to verify.- Returns:
- Whether there is an encounter mode with the given name.
-
getLocalizedName
Gets the localized name of the encounter mode.- Returns:
- The localized name of the encounter mode.
-