Package net.blueva.arcade.api.player
Enum PlayerState
- All Implemented Interfaces:
Serializable,Comparable<PlayerState>
Represents the different states a player can be in during a game.
Players typically start as PLAYING and may transition to ELIMINATED or SPECTATOR based on game events and rules.
-
Enum Constant Summary
Enum ConstantsEnum ConstantDescriptionThe player has been eliminated from the game.The player is actively participating in the game.The player is spectating the game. -
Method Summary
Modifier and TypeMethodDescriptionstatic PlayerStateReturns the enum constant of this type with the specified name.static PlayerState[]values()Returns an array containing the constants of this enum type, in the order they are declared.
-
Enum Constant Details
-
PLAYING
The player is actively participating in the game. This is the default state for players who are alive and competing. -
SPECTATOR
The player is spectating the game. Spectators can watch the game but cannot interact with gameplay elements. This state is typically used for players who join after the game has started. -
ELIMINATED
The player has been eliminated from the game. Eliminated players can no longer participate but may still be in the arena as spectators depending on the game configuration.
-
-
Method Details
-
values
Returns an array containing the constants of this enum type, in the order they are declared.- Returns:
- an array containing the constants of this enum type, in the order they are declared
-
valueOf
Returns the enum constant of this type with the specified name. The string must match exactly an identifier used to declare an enum constant in this type. (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 type has no constant with the specified nameNullPointerException- if the argument is null
-