Package com.djrapitops.plan.settings
Interface SettingsService
public interface SettingsService
Service for defining plugin specific settings to the Plan config.
All given paths will be prepended with "Plugins." to place the settings in the plugins config section.
It is recommended to use setting paths "<Plugin_name>.Some_setting"
Requires Capability SETTINGS_API
-
Nested Class Summary
-
Method Summary
Modifier and TypeMethodDescriptionstatic SettingsService
getInteger
(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.
-
Method Details
-
getInstance
-
getString
Get a String from the config or the default value.- Parameters:
path
- Path in the configdefaultValue
- Supplier for the default value,() -> "Example"
.- Returns:
- value in the config
-
getInteger
Get a Integer from the config or the default value.- Parameters:
path
- Path in the configdefaultValue
- Supplier for the default value,() -> 500
.- Returns:
- value in the config
-
getStringList
Get a String list from the config or the default value.- Parameters:
path
- Path in the configdefaultValue
- Supplier for the default value,() -> Arrays.asList("Example", "Another")
.- Returns:
- value in the config
-