Package dev.itsharshxd.zentrix.api.game
Enum Class ZentrixGame.GameState
- All Implemented Interfaces:
Serializable,Comparable<ZentrixGame.GameState>,Constable
- Enclosing interface:
ZentrixGame
Represents the possible states of a Zentrix game.
-
Nested Class Summary
Nested classes/interfaces inherited from class java.lang.Enum
Enum.EnumDesc<E extends Enum<E>> -
Enum Constant Summary
Enum ConstantsEnum ConstantDescriptionGame has ended and winner is being announced.Game is actively being played.Game is restarting/cleaning up.Game has enough players and countdown has started.Game is waiting for players to join. -
Method Summary
Modifier and TypeMethodDescriptionstatic ZentrixGame.GameStateReturns the enum constant of this class with the specified name.static ZentrixGame.GameState[]values()Returns an array containing the constants of this enum class, in the order they are declared.
-
Enum Constant Details
-
WAITING
Game is waiting for players to join. Players can join during this state. -
STARTING
Game has enough players and countdown has started. Players can still join during this state. -
PLAYING
Game is actively being played. Players cannot join (only spectate). -
ENDING
Game has ended and winner is being announced. Transitioning to cleanup. -
RESTARTING
Game is restarting/cleaning up. Arena is being reset.
-
-
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
-