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>
  • Enum Constant Details

    • STOPPED

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

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

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

      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

      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

    • values

      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

      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

      public String getId()
      Returns the id of this state
      Returns:
      The id
    • getLegacyId

      @Deprecated public int getLegacyId()
      Deprecated.
      getId() should be used instead as this method will be removed in the future
      Returns the legacy id
      Returns:
      The legacy id
    • getSignName

      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

      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

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

      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

      @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
    • fromLegacyId

      @Deprecated @Nullable public static @Nullable ArenaStatus fromLegacyId(int legacyId)
      Deprecated.
      Will be removed in the future
      Returns the ArenaStatus which the corresponding legacy id
      Parameters:
      legacyId - The id we've got
      Returns:
      The ArenaStatus which the corresponding legacy id