Enum Class CustomGameState

java.lang.Object
java.lang.Enum<CustomGameState>
dev.itsharshxd.zentrix.api.customgame.CustomGameState
All Implemented Interfaces:
Serializable, Comparable<CustomGameState>, Constable

public enum CustomGameState extends Enum<CustomGameState>
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
  • Enum Constant Details

    • SCHEDULED

      public static final CustomGameState SCHEDULED
      Published, with no lobby of its own right now: its worlds are still being built.
    • WAITING

      public static final CustomGameState WAITING
      Published, its lobby is standing, and players may walk in until its start time.
    • ACTIVE

      public static final CustomGameState ACTIVE
      Its match is running.
    • COMPLETED

      public static final CustomGameState COMPLETED
      Its match finished.
    • CANCELLED

      public static final CustomGameState CANCELLED
      Called off by its host, an administrator, or because it could not start.
  • Method Details

    • values

      public static CustomGameState[] 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

      public static CustomGameState valueOf(String name)
      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 name
      NullPointerException - 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.