Enum ArenaStatus

java.lang.Object
java.lang.Enum<ArenaStatus>
de.marcely.bedwars.api.arena.ArenaStatus
All Implemented Interfaces:
Serializable, Comparable<ArenaStatus>, java.lang.constant.Constable

public enum ArenaStatus extends Enum<ArenaStatus>
Represents the state of an arena. This determines what the plugin is processing at a given moment
  • Enum Constant Details Link icon

    • STOPPED Link icon

      public static final ArenaStatus STOPPED
      The arena is stopped. Nobody is able to join and nothing is happening
    • LOBBY Link icon

      public static final ArenaStatus LOBBY
      Players are waiting for other players and until the game starts
    • RUNNING Link icon

      public static final ArenaStatus RUNNING
      The game is running with players playing and spectators spectating
    • RESETTING Link icon

      public static final ArenaStatus RESETTING
      The game has finished. Now it's time to clean everything up and prepare the arena for the next match
    • END_LOBBY Link icon

      public static final ArenaStatus END_LOBBY
      Possibly before RESETTING and after RUNNING. The game has ended, now we're celebrating the winner (if there's even one)
  • Method Details Link icon

    • values Link icon

      public static ArenaStatus[] 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 Link icon

      public static ArenaStatus valueOf(String name)
      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 name
      NullPointerException - if the argument is null
    • getId Link icon

      public String getId()
      Returns the id of this state
      Returns:
      The id
    • getSignName Link icon

      public String getSignName()
      You can find them in the messages file under: "Sign_[status]".
      Uses the configured language as the default language
      Returns:
      The name of the status that can be represented on a sign
    • getSignName Link icon

      public String getSignName(@Nullable @Nullable CommandSender sender)
      You can find them in the messages file under: "Sign_[status]".
      Uses the configured language as the default language
      Parameters:
      sender - The person from which it should look up the language. Null if it should take the default language
      Returns:
      The name of the status that can be represented on a sign
    • isLobby Link icon

      public boolean isLobby()
      Returns true when using:
      - LOBBY
      - END_LOBBY
      Returns:
      Whether it's a lobby status or not
    • canHavePlayers Link icon

      public boolean canHavePlayers()
      Returns true when using:
      - LOBBY
      - RUNNING
      - END_LOBBY
      Returns:
      Whether or not players can be inside the arena during this state
    • fromId Link icon

      @Nullable public static @Nullable ArenaStatus fromId(String id)
      Returns the ArenaStatus which the corresponding id
      Parameters:
      id - The id we've got
      Returns:
      The ArenaStatus which the corresponding id