Package dev.itsharshxd.zentrix.api.perk
Enum Class PerkResolutionMode
- All Implemented Interfaces:
Serializable,Comparable<PerkResolutionMode>,Constable
How a player holding several tiers gets each perk, set by
resolution-mode in
perks.yml. Either way, the tier a player is shown as belonging to is the
highest-priority one they hold.- Since:
- 1.16.0
-
Nested Class Summary
Nested classes/interfaces inherited from class java.lang.Enum
Enum.EnumDesc<E extends Enum<E>> -
Enum Constant Summary
Enum ConstantsEnum ConstantDescriptionEach perk takes the best value across every tier the player holds: the highest number, unlimited above all, and a toggle any of them allows.Every perk comes from the highest-priority tier the player holds. -
Method Summary
Modifier and TypeMethodDescriptionstatic @NotNull Optional<PerkResolutionMode> The mode aperks.ymlvalue names, ignoring case, dashes and underscores.@NotNull StringgetKey()The value written inperks.yml, such asbest-value.static PerkResolutionModeReturns the enum constant of this class with the specified name.static PerkResolutionMode[]values()Returns an array containing the constants of this enum class, in the order they are declared.
-
Enum Constant Details
-
HIGHEST_PRIORITY
Every perk comes from the highest-priority tier the player holds. -
BEST_VALUE
Each perk takes the best value across every tier the player holds: the highest number, unlimited above all, and a toggle any of them allows.
-
-
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
-
getKey
The value written inperks.yml, such asbest-value. -
fromKey
@NotNull public static @NotNull Optional<PerkResolutionMode> fromKey(@Nullable @Nullable String key) The mode aperks.ymlvalue names, ignoring case, dashes and underscores.
-