Enum Class CustomGameState
- All Implemented Interfaces:
Serializable,Comparable<CustomGameState>,Constable
Where a player-hosted custom game is in its life.
Only SCHEDULED and WAITING games survive a restart: a match that already
started cannot be picked up again, and a finished one has nothing left to restore.
- Since:
- 1.8.0
-
Nested Class Summary
Nested classes/interfaces inherited from class java.lang.Enum
Enum.EnumDesc<E extends Enum<E>> -
Enum Constant Summary
Enum ConstantsEnum ConstantDescriptionIts match is running.Called off by its host, an administrator, or because it could not start.Its match finished.Published, with no lobby of its own right now: its worlds are still being built.Published, its lobby is standing, and players may walk in until its start time. -
Method Summary
Modifier and TypeMethodDescriptionbooleanWhether the game is over, one way or another.booleanWhether the game is still waiting to start.static CustomGameStateReturns the enum constant of this class with the specified name.static CustomGameState[]values()Returns an array containing the constants of this enum class, in the order they are declared.
-
Enum Constant Details
-
SCHEDULED
Published, with no lobby of its own right now: its worlds are still being built. -
WAITING
Published, its lobby is standing, and players may walk in until its start time. -
ACTIVE
Its match is running. -
COMPLETED
Its match finished. -
CANCELLED
Called off by its host, an administrator, or because it could not start.
-
-
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
-
isUpcoming
public boolean isUpcoming()Whether the game is still waiting to start. -
isFinished
public boolean isFinished()Whether the game is over, one way or another.
-