Interface ConfigObserver<T extends AbstractConfig<?>>

All Known Implementing Classes:
CachedConfig

public interface ConfigObserver<T extends AbstractConfig<?>>
Interface for classes that want to be notified when a config is updated.

You should register this observer with a ObservableConfig class. Then the onConfigLoaded(AbstractConfig) method will be called each time the config is updated.

Observed Config Updates Include:
- Initial load of config data
- Each time the config is reloaded

If this observer is registered after the initial load, it will be called immediately to receive those values.

See ObservableConfig.registerConfigObserver(ConfigObserver) for more information.
  • Method Summary

    Modifier and Type
    Method
    Description
    void
    onConfigLoaded(T config)
    Called each time the backing config is loaded or reloaded.
  • Method Details

    • onConfigLoaded

      void onConfigLoaded(@NotNull T config)
      Called each time the backing config is loaded or reloaded.
      Parameters:
      config - The updated config object for consumption by this method.