Package dev.itsharshxd.zentrix.api.perk
Enum Class Perk
- All Implemented Interfaces:
Serializable,Comparable<Perk>,Constable
A limit of Zentrix that a perk tier in
perks.yml can raise or lower for the players
holding its permission.
A Perk.Type.NUMBER perk is a count, such as how many games a host may have at once. A
Perk.Type.TOGGLE perk is allowed or not, such as using the team changer.
- Since:
- 1.9.0
-
Nested Class Summary
Nested ClassesNested classes/interfaces inherited from class java.lang.Enum
Enum.EnumDesc<E extends Enum<E>> -
Enum Constant Summary
Enum ConstantsEnum ConstantDescriptionWhether a host's publications skip the server-wide publish limit, which caps how many games every host together may publish per interval.Whether a player may create and publish custom games.How many scheduled, waiting or running custom games one host may have at once.Whether a host may protect their custom games with a password.Whether a host may change the settings of the scenarios they pick.How many friends a player may have.The largest a party may grow, decided by its current leader.A bonus, in percent, on the currency a player earns from match rewards:50pays one and a half times as much.Whether a player may use the team changer in a waiting lobby. -
Method Summary
Modifier and TypeMethodDescriptionThe perk a key names: itsperks.ymlkey, or its enum name, ignoring case.@NotNull StringgetKey()The key this perk is written under inperks.yml, such asparty.max-size.@NotNull Perk.TypegetType()What kind of value the perk holds.static PerkReturns the enum constant of this class with the specified name.static Perk[]values()Returns an array containing the constants of this enum class, in the order they are declared.
-
Enum Constant Details
-
CUSTOM_GAMES_CREATE
Whether a player may create and publish custom games. Refusing it never stops them joining custom games, and never cancels the games they already published.- Since:
- 1.10.0
-
CUSTOM_GAMES_MAX_HOSTED
How many scheduled, waiting or running custom games one host may have at once. This limit counts one host's own games; the server-wide publish limit is separate, seeCUSTOM_GAMES_BYPASS_PUBLISH_LIMIT. -
CUSTOM_GAMES_PRIVATE
Whether a host may protect their custom games with a password. -
CUSTOM_GAMES_SCENARIO_SETTINGS
Whether a host may change the settings of the scenarios they pick. -
CUSTOM_GAMES_BYPASS_PUBLISH_LIMIT
Whether a host's publications skip the server-wide publish limit, which caps how many games every host together may publish per interval. Their games still count towards it, andCUSTOM_GAMES_MAX_HOSTEDstill applies. -
PARTY_MAX_SIZE
The largest a party may grow, decided by its current leader. -
FRIENDS_MAX_FRIENDS
How many friends a player may have. Asked as a friend is added, so a player already past a lowered limit keeps their friends.- Since:
- 1.12.0
-
REWARDS_BONUS
A bonus, in percent, on the currency a player earns from match rewards:50pays one and a half times as much. Boosts add to it. Penalties are never raised, and a reward multiplier permission node a player also holds applies instead when it is higher.- Since:
- 1.12.0
-
TEAM_CHANGER
Whether a player may use the team changer in a waiting lobby.
-
-
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 key this perk is written under inperks.yml, such asparty.max-size. -
getType
What kind of value the perk holds. -
fromKey
The perk a key names: itsperks.ymlkey, or its enum name, ignoring case. Dashes, dots and underscores are interchangeable, soparty_max_sizenamesPARTY_MAX_SIZEas well.
-