Enum Class ServerStatus

java.lang.Object
java.lang.Enum<ServerStatus>
dev.le_app.mcss_api_java.ServerStatus
All Implemented Interfaces:
Serializable, Comparable<ServerStatus>, Constable

public enum ServerStatus extends Enum<ServerStatus>
List of all possible statuses of a server.
  • Enum Constant Details

    • OFFLINE

      public static final ServerStatus OFFLINE
      The server is offline
    • ONLINE

      public static final ServerStatus ONLINE
      The server is online
    • RESTARTING

      public static final ServerStatus RESTARTING
      The server is restarting
    • STARTING

      public static final ServerStatus STARTING
      The server is starting
    • STOPPING

      public static final ServerStatus STOPPING
      The server is stopping
  • Method Details

    • values

      public static ServerStatus[] 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 ServerStatus 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
    • getValue

      public int getValue()
      Gets associated value for the server status - Used for API requests.
      Returns:
      The server status as INT.
    • findByVal

      public static ServerStatus findByVal(int abbr)
      Gets the server status from the value.
      Parameters:
      abbr - The value to get the server status from.
      Returns:
      The server status.