Enum Class ScenarioSettingType

java.lang.Object
java.lang.Enum<ScenarioSettingType>
dev.itsharshxd.zentrix.api.scenario.ScenarioSettingType
All Implemented Interfaces:
Serializable, Comparable<ScenarioSettingType>, Constable

public enum ScenarioSettingType extends Enum<ScenarioSettingType>
The value kinds a scenario setting can declare.

The type decides how a value is validated, how the management GUI edits it, and how it is written back to scenarios.yml.

Since:
1.6.0
  • Enum Constant Details

    • BOOLEAN

      public static final ScenarioSettingType BOOLEAN
      A toggle, edited by clicking.
    • INTEGER

      public static final ScenarioSettingType INTEGER
      A whole number bounded by the setting's minimum and maximum.
    • DECIMAL

      public static final ScenarioSettingType DECIMAL
      A fractional number bounded by the setting's minimum and maximum.
    • STRING

      public static final ScenarioSettingType STRING
      Free text, captured from chat.
    • ENUM

      public static final ScenarioSettingType ENUM
      One of the setting's allowed values, cycled by clicking.
    • STRING_LIST

      public static final ScenarioSettingType STRING_LIST
      A list of free-text values, edited through chat.
    • MATERIAL

      public static final ScenarioSettingType MATERIAL
      A single Bukkit Material name.
    • MATERIAL_LIST

      public static final ScenarioSettingType MATERIAL_LIST
      A list of Bukkit Material names.
    • STRUCTURED_LIST

      public static final ScenarioSettingType STRUCTURED_LIST
      A list of entries whose fields the scenario declares itself, through a ScenarioEntrySchema.

      One field makes a plain list, two make a list of pairs, more make whatever the scenario needs. Zentrix validates every field against its declaration, edits entries in a dedicated management screen, writes them to scenarios.yml as a list of maps, and freezes them into a match's settings snapshot like any other value.

      Since:
      1.6.0
  • Method Details

    • values

      public static ScenarioSettingType[] 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 ScenarioSettingType 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