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

  • Method Details

    • getInstance

      static SettingsService getInstance()
    • getString

      String getString(String path, Supplier<String> defaultValue)
      Get a String from the config or the default value.
      Parameters:
      path - Path in the config
      defaultValue - Supplier for the default value, () -> "Example".
      Returns:
      value in the config
    • getInteger

      Integer getInteger(String path, Supplier<Integer> defaultValue)
      Get a Integer from the config or the default value.
      Parameters:
      path - Path in the config
      defaultValue - Supplier for the default value, () -> 500.
      Returns:
      value in the config
    • getStringList

      List<String> getStringList(String path, Supplier<List<String>> defaultValue)
      Get a String list from the config or the default value.
      Parameters:
      path - Path in the config
      defaultValue - Supplier for the default value, () -> Arrays.asList("Example", "Another").
      Returns:
      value in the config