public static enum GeneralSettings.KeyFormat extends Enum<GeneralSettings.KeyFormat>
| Enum Constant and Description |
|---|
OBJECT
Allows anything as the key per the YAML specification (that is, integers, strings, doubles...).
|
STRING
Allows only strings as keys.
|
| Modifier and Type | Method and Description |
|---|---|
static GeneralSettings.KeyFormat |
valueOf(String name)
Returns the enum constant of this type with the specified name.
|
static GeneralSettings.KeyFormat[] |
values()
Returns an array containing the constants of this enum type, in
the order they are declared.
|
public static final GeneralSettings.KeyFormat STRING
Object.toString() (e.g. 5 -> "5"), except null keys, which are considered illegal and will throw a NullPointerException. Please note that such conversion is irrevocable upon saving.Routes can still be used, however, due to their capabilities, it is considered to be an overkill; all non-string keys supplied via those will internally be converted to strings (without modifying the route itself, they are immutable).This key format ensures compatibility with Spigot/BungeeCord APIs.
public static final GeneralSettings.KeyFormat OBJECT
Route. String routes can still be used, however, only to the extent of their limitations.public static GeneralSettings.KeyFormat[] values()
for (GeneralSettings.KeyFormat c : GeneralSettings.KeyFormat.values()) System.out.println(c);
public static GeneralSettings.KeyFormat valueOf(String name)
name - the name of the enum constant to be returned.IllegalArgumentException - if this enum type has no constant with the specified nameNullPointerException - if the argument is nullCopyright © 2022. All rights reserved.