Enum Class ServerAction

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

public enum ServerAction extends Enum<ServerAction>
Lists of possible server actions.
  • Enum Constant Details

    • INVALID

      public static final ServerAction INVALID
      Invalid - reserved
    • STOP

      public static final ServerAction STOP
      Stop the server
    • START

      public static final ServerAction START
      Start the server
    • KILL

      public static final ServerAction KILL
      Kill the server
    • RESTART

      public static final ServerAction RESTART
      Restart the server
  • Method Details

    • values

      public static ServerAction[] 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 ServerAction 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 action - Used for API requests.
      Returns:
      The server action as INT.