Enum Class CurrencyEventType
- All Implemented Interfaces:
Serializable,Comparable<CurrencyEventType>,Constable
Represents the types of events that can trigger currency rewards or penalties.
Each event type corresponds to a specific in-game action that may award or deduct currency from a player's balance.
Example Usage
CurrencyService currencyService = ZentrixProvider.get().getCurrencyService();
// Check if kills award currency
if (currencyService.isEventEnabled(CurrencyEventType.PLAYER_KILL)) {
double reward = currencyService.getEventReward(CurrencyEventType.PLAYER_KILL);
player.sendMessage("Kills award " + reward + " coins!");
}
- Since:
- 1.0.0
-
Nested Class Summary
Nested classes/interfaces inherited from class java.lang.Enum
Enum.EnumDesc<E extends Enum<E>> -
Enum Constant Summary
Enum ConstantsEnum ConstantDescriptionAwarded when Archer's bow buff procs.Awarded when any class ability triggers.Awarded when a player selects or changes class.Awarded for crafting any custom recipe.Awarded for first-time craft of a one-time recipe.Awarded for getting the first kill in a game.Awarded when Fisherman's bonus procs.Awarded/deducted when a player joins a game.Applied when a player leaves during active gameplay (can be negative).Awarded when a player/team wins the game.Awarded when a player becomes the last surviving member of their team.Awarded when Looter gets bonus item from chest.Awarded when Miner's auto-smelt procs.Awarded for simply participating in a game (regardless of placement).Applied when a player dies (can be a penalty/negative value).Awarded when a player kills another player.Awarded for surviving until deathmatch.Awarded for reaching top 3 (last 3 teams/players).Awarded for reaching top 5 (last 5 teams/players).Awarded when Trapper's fall damage reduction procs.Awarded when Warrior's true damage procs. -
Method Summary
Modifier and TypeMethodDescriptionstatic @Nullable CurrencyEventTypefromConfigKey(@Nullable String key) Gets a CurrencyEventType from its configuration key.static @Nullable CurrencyEventTypeGets a CurrencyEventType from its name (case-insensitive).@NotNull StringGets the configuration key for this event type.booleanChecks if this is a class ability event.booleanChecks if this is a combat-related event.booleanChecks if this is a game lifecycle event.booleanChecks if this is a milestone/position event.toString()static CurrencyEventTypeReturns the enum constant of this class with the specified name.static CurrencyEventType[]values()Returns an array containing the constants of this enum class, in the order they are declared.
-
Enum Constant Details
-
GAME_WIN
Awarded when a player/team wins the game. -
GAME_JOIN
Awarded/deducted when a player joins a game. -
GAME_LEAVE
Applied when a player leaves during active gameplay (can be negative). -
PLAYER_KILL
Awarded when a player kills another player. -
PLAYER_DEATH
Applied when a player dies (can be a penalty/negative value). -
FIRST_BLOOD
Awarded for getting the first kill in a game. -
SURVIVES_DEATHMATCH
Awarded for surviving until deathmatch. -
TOP_5
Awarded for reaching top 5 (last 5 teams/players). Triggers once per game per team. -
TOP_3
Awarded for reaching top 3 (last 3 teams/players). Triggers once per game per team. -
CLASS_SELECT
Awarded when a player selects or changes class. -
CLASS_ABILITY_TRIGGER
Awarded when any class ability triggers. -
WARRIOR_TRUE_DAMAGE
Awarded when Warrior's true damage procs. -
ARCHER_BOW_BUFF
Awarded when Archer's bow buff procs. -
LOOTER_CHEST_BONUS
Awarded when Looter gets bonus item from chest. -
TRAPPER_FALL_REDUCTION
Awarded when Trapper's fall damage reduction procs. -
FISHERMAN_BONUS
Awarded when Fisherman's bonus procs. -
MINER_AUTO_SMELT
Awarded when Miner's auto-smelt procs. -
CRAFTS_CUSTOM_RECIPE
Awarded for crafting any custom recipe. -
CRAFTS_FIRST_TIME
Awarded for first-time craft of a one-time recipe. -
LAST_TEAM_MEMBER
Awarded when a player becomes the last surviving member of their team. -
PARTICIPATION
Awarded for simply participating in a game (regardless of placement).
-
-
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
-
getConfigKey
Gets the configuration key for this event type.This is the key used in
currency.ymlto configure rewards.- Returns:
- The config key (e.g., "player-kill", "first-blood")
-
isCombatEvent
public boolean isCombatEvent()Checks if this is a combat-related event.- Returns:
trueif this event relates to combat
-
isClassEvent
public boolean isClassEvent()Checks if this is a class ability event.- Returns:
trueif this event relates to class abilities
-
isMilestoneEvent
public boolean isMilestoneEvent()Checks if this is a milestone/position event.- Returns:
trueif this event is a milestone achievement
-
isGameLifecycleEvent
public boolean isGameLifecycleEvent()Checks if this is a game lifecycle event.- Returns:
trueif this event relates to game lifecycle
-
fromConfigKey
Gets a CurrencyEventType from its configuration key.- Parameters:
key- The configuration key- Returns:
- The matching event type, or null if not found
-
fromName
Gets a CurrencyEventType from its name (case-insensitive).- Parameters:
name- The enum name- Returns:
- The matching event type, or null if not found
-
toString
- Overrides:
toStringin classEnum<CurrencyEventType>
-