Package com.nexomc.nexo.configs
Enum Settings
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description public class
Settings.Companion
-
Enum Constant Summary
-
Method Summary
Modifier and Type Method Description final Unit
setValue(Object value, Boolean save)
String
toString()
final String
toString(String optionalDefault)
final Key
toKey()
final Key
toKey(Key optionalDefault)
final <E extends Enum<E>> E
toEnum(Class<E> enumClass, E defaultValue)
final <E extends Enum<E>> E
toEnumOrGet(Class<E> enumClass, Function1<String, E> fallback)
final Component
toComponent()
final Integer
toInt()
final Integer
toInt(Integer optionalDefault)
final Boolean
toBool(Boolean defaultValue)
final Boolean
toBool()
final List<String>
toStringList()
final ConfigurationSection
toConfigSection()
final Settings
valueOf(String value)
Returns the enum constant of this type with the specified name. final Array<Settings>
values()
Returns an array containing the constants of this enum type, in the order they're declared. final String
getPath()
final Object
getValue()
final Unit
setValue(Object value)
final EnumEntries<Settings>
getEntries()
-
-
Method Detail
-
toKey
final Key toKey()
-
toKey
final Key toKey(Key optionalDefault)
-
toEnumOrGet
final <E extends Enum<E>> E toEnumOrGet(Class<E> enumClass, Function1<String, E> fallback)
-
toComponent
final Component toComponent()
-
toInt
final Integer toInt(Integer optionalDefault)
- Parameters:
optionalDefault
- value to return if the path is not an integer- Returns:
the value of the path as an int, or the default value if the path is not found
-
toStringList
final List<String> toStringList()
-
toConfigSection
final ConfigurationSection toConfigSection()
-
valueOf
final Settings valueOf(String value)
Returns the enum constant of this type with the specified name. The string must match exactly an identifier used to declare an enum constant in this type. (Extraneous whitespace characters are not permitted.)
-
values
final Array<Settings> values()
Returns an array containing the constants of this enum type, in the order they're declared.
This method may be used to iterate over the constants.
-
getEntries
final EnumEntries<Settings> getEntries()
-
-
-
-