Enum Class PotionEffectProvider.RetrievalState
java.lang.Object
java.lang.Enum<PotionEffectProvider.RetrievalState>
org.skriptlang.skript.bukkit.potion.providers.PotionEffectProvider.RetrievalState
- All Implemented Interfaces:
Serializable, Comparable<PotionEffectProvider.RetrievalState>, Constable
- Enclosing class:
PotionEffectProvider<T>
public static enum PotionEffectProvider.RetrievalState
extends Enum<PotionEffectProvider.RetrievalState>
Describes the type of potion effects being retrieved in a retrieval operation.
This is used for distinguishing between active and hidden potion effects, which only apply to
LivingEntity.-
Nested Class Summary
Nested classes/interfaces inherited from class Enum
Enum.EnumDesc<E> -
Enum Constant Summary
Enum Constants -
Method Summary
Modifier and TypeMethodDescriptionfromParseTag(String tag) Utility method for standardized mapping of a parse tag to a retrieval state.booleanbooleanReturns the enum constant of this class with the specified name.static PotionEffectProvider.RetrievalState[]values()Returns an array containing the constants of this enum class, in the order they are declared.
-
Enum Constant Details
-
UNSET
Unspecified retrieval state. Behavior will differ depending on retrieval context. -
ACTIVE
Obtaining only active effects -
HIDDEN
Obtaining only hidden effects -
BOTH
-
-
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
-
fromParseTag
Utility method for standardized mapping of a parse tag to a retrieval state.- Parameters:
tag- Parse tag representing a retrieval state.- Returns:
- A retrieval state.
-
includesActive
public boolean includesActive()- Returns:
- Whether this state includes active potion effects.
-
includesHidden
public boolean includesHidden()- Returns:
- Whether this state includes hidden potion effects.
-
displayName
- Returns:
- A user-friendly string describing this retrieval state.
-