Package com.djrapitops.plan.settings
Class SettingsSvc
java.lang.Object
com.djrapitops.plan.settings.SettingsSvc
- All Implemented Interfaces:
SettingsService
Implementation for
SettingsService
.-
Nested Class Summary
Nested classes/interfaces inherited from interface com.djrapitops.plan.settings.SettingsService
SettingsService.Holder
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptiongetInteger
(String path, Supplier<Integer> defaultValue) Get a Integer from the config or the default value.Get a String from the config or the default value.getStringList
(String path, Supplier<List<String>> defaultValue) Get a String list from the config or the default value.void
register()
<T> void
-
Constructor Details
-
SettingsSvc
-
-
Method Details
-
register
public void register() -
getString
Description copied from interface:SettingsService
Get a String from the config or the default value.- Specified by:
getString
in interfaceSettingsService
- Parameters:
path
- Path in the configdefaultValue
- Supplier for the default value,() -> "Example"
.- Returns:
- value in the config
-
set
-
getInteger
Description copied from interface:SettingsService
Get a Integer from the config or the default value.- Specified by:
getInteger
in interfaceSettingsService
- Parameters:
path
- Path in the configdefaultValue
- Supplier for the default value,() -> 500
.- Returns:
- value in the config
-
getStringList
Description copied from interface:SettingsService
Get a String list from the config or the default value.- Specified by:
getStringList
in interfaceSettingsService
- Parameters:
path
- Path in the configdefaultValue
- Supplier for the default value,() -> Arrays.asList("Example", "Another")
.- Returns:
- value in the config
-