Interface ConfigPath<T>

Type Parameters:
T - the type of the value
All Known Implementing Classes:
AdvancedConfigPath, BaseConfigPath, BooleanConfigPath, CommentablePath, DoubleConfigPath, FloatConfigPath, IntegerConfigPath, LongConfigPath, MapConfigPath, SerializableMapConfigPath, SimpleConfigPath, StickyConfigPath, StringConfigPath

public interface ConfigPath<T>
The interface of ConfigPath classes
  • Method Summary

    Modifier and Type
    Method
    Description
    @Nullable Config
    Get the config
    @NotNull String
    Get the path to the value
    Get the value
    getValue(@NotNull Config config)
    Get the value from the config.
    default void
    migrateConfig(@NotNull Config config)
    Manually update the config (Mainly used when updating new settings)
    default void
    Reload the path
    default void
    setAndSave(T value)
    Set the value and save the config
    default void
    setAndSave(T value, @NotNull Config config)
    Set the value and save the config
    void
    setConfig(@NotNull Config config)
    Set the config.
    void
    setValue(T value)
    Set the value
    void
    setValue(T value, @NotNull Config config)
    Set the value to the config.
  • Method Details

    • getValue

      T getValue()
      Get the value
      Returns:
      the value
    • setValue

      void setValue(@Nullable T value)
      Set the value
      Parameters:
      value - the value
    • getValue

      T getValue(@NotNull @NotNull Config config)
      Get the value from the config. This is used to get the value from multiple configs.
      Parameters:
      config - the config
      Returns:
      the value
    • setValue

      void setValue(@Nullable T value, @NotNull @NotNull Config config)
      Set the value to the config. This is used to set the value to multiple configs.
      Parameters:
      value - the value
      config - the config
    • getPath

      @NotNull @NotNull String getPath()
      Get the path to the value
      Returns:
      the path
    • getConfig

      @Nullable @Nullable Config getConfig()
      Get the config
      Returns:
      the config
    • setConfig

      void setConfig(@NotNull @NotNull Config config)
      Set the config.
      Parameters:
      config - the config
    • migrateConfig

      default void migrateConfig(@NotNull @NotNull Config config)
      Manually update the config (Mainly used when updating new settings)
      Parameters:
      config - the config
    • reload

      default void reload()
      Reload the path
    • setAndSave

      default void setAndSave(@Nullable T value, @NotNull @NotNull Config config)
      Set the value and save the config
      Parameters:
      value - the value
      config - the config
    • setAndSave

      default void setAndSave(@Nullable T value)
      Set the value and save the config
      Parameters:
      value - the value