Package com.nexomc.nexo.configs
Enum Settings
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description public classSettings.Companion
-
Enum Constant Summary
-
Method Summary
Modifier and Type Method Description final UnitsetValue(Object value, Boolean save)StringtoString()final StringtoString(String optionalDefault)final KeytoKey()final KeytoKey(Key optionalDefault)final <E extends Enum<E>> EtoEnum(Class<E> enumClass, E defaultValue)final <E extends Enum<E>> EtoEnumOrGet(Class<E> enumClass, Function1<String, E> fallback)final ComponenttoComponent()final IntegertoInt()final IntegertoInt(Integer optionalDefault)final BooleantoBool(Boolean defaultValue)final BooleantoBool()final List<String>toStringList()final ConfigurationSectiontoConfigSection()final SettingsvalueOf(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 StringgetPath()final ObjectgetValue()final UnitsetValue(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()
-
-
-
-