Enum Class PlayerRequirement

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

public enum PlayerRequirement extends Enum<PlayerRequirement>
The player requirement for a task to be executed
  • Enum Constant Details

    • EMPTY

      public static final PlayerRequirement EMPTY
      The taks will be executed only if the server is empty
    • AT_LEAST_ONE

      public static final PlayerRequirement AT_LEAST_ONE
      The task will be executed only if the server is not empty
    • NONE

      public static final PlayerRequirement NONE
      The task will be executed regardless of the player count
  • Method Details

    • values

      public static PlayerRequirement[] 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 PlayerRequirement 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 Integer getValue()
      Gets associated value for the player requirement - Used for API requests.
      Returns:
      The player requirement as INT.
    • findByVal

      public static PlayerRequirement findByVal(Integer abbr)
      Gets the player requirement from the value.
      Parameters:
      abbr - The value to get the player requirement from.
      Returns:
      The player requirement.