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
Constructors -
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.voidregister()<T> void
-
Constructor Details
-
SettingsSvc
-
-
Method Details
-
register
public void register() -
getString
Description copied from interface:SettingsServiceGet a String from the config or the default value.- Specified by:
getStringin interfaceSettingsService- Parameters:
path- Path in the configdefaultValue- Supplier for the default value,() -> "Example".- Returns:
- value in the config
-
set
-
getInteger
Description copied from interface:SettingsServiceGet a Integer from the config or the default value.- Specified by:
getIntegerin interfaceSettingsService- Parameters:
path- Path in the configdefaultValue- Supplier for the default value,() -> 500.- Returns:
- value in the config
-
getStringList
Description copied from interface:SettingsServiceGet a String list from the config or the default value.- Specified by:
getStringListin interfaceSettingsService- Parameters:
path- Path in the configdefaultValue- Supplier for the default value,() -> Arrays.asList("Example", "Another").- Returns:
- value in the config
-