Enum Class ScenarioFieldType
- All Implemented Interfaces:
Serializable,Comparable<ScenarioFieldType>,Constable
A field type decides how a single value inside a
ScenarioSettingType.STRUCTURED_LIST entry is validated, how the management GUI edits it,
and how it is written back to scenarios.yml. It is deliberately the same idea as
ScenarioSettingType, minus the list kinds: an entry field always holds one value, because
the entry itself is what the list is made of.
- Since:
- 1.6.0
-
Nested Class Summary
Nested classes/interfaces inherited from class java.lang.Enum
Enum.EnumDesc<E extends Enum<E>> -
Enum Constant Summary
Enum ConstantsEnum ConstantDescriptionA placed block, written as an identifier Zentrix can match against a block in the world.A toggle, edited by clicking.A fractional number bounded by the field's minimum and maximum.One of the field's allowed values, cycled by clicking.A whole number bounded by the field's minimum and maximum.An item, written as an identifier Zentrix can resolve into anItemStack.A single BukkitMaterialname.Free text, captured from chat. -
Method Summary
Modifier and TypeMethodDescriptionbooleanWhether this field accepts the numeric bounds of its declaration.booleanisTyped()Whether values of this field are typed in chat rather than clicked.static ScenarioFieldTypeReturns the enum constant of this class with the specified name.static ScenarioFieldType[]values()Returns an array containing the constants of this enum class, in the order they are declared.
-
Enum Constant Details
-
STRING
Free text, captured from chat. -
INTEGER
A whole number bounded by the field's minimum and maximum. -
DECIMAL
A fractional number bounded by the field's minimum and maximum. -
BOOLEAN
A toggle, edited by clicking. -
ENUM
One of the field's allowed values, cycled by clicking. -
MATERIAL
A single BukkitMaterialname. -
ITEM
An item, written as an identifier Zentrix can resolve into anItemStack.Accepted forms are a vanilla material name,
custom:<items.yml key>,itemsadder:<namespace:id>andnexo:<id>. An identifier belonging to a plugin that is not installed is rejected when it is entered, so a stored value always resolves. -
BLOCK
A placed block, written as an identifier Zentrix can match against a block in the world.Accepted forms are a vanilla block material name,
itemsadder:<namespace:id>andnexo:<id>. Item-only material names are rejected, because nothing in a world could ever match them.
-
-
Method Details
-
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
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 nameNullPointerException- if the argument is null
-
isNumeric
public boolean isNumeric()Whether this field accepts the numeric bounds of its declaration. -
isTyped
public boolean isTyped()Whether values of this field are typed in chat rather than clicked.
-