Class ConfigHelper.ConfigObject<T>

java.lang.Object
tech.anonymoushacker1279.immersiveweapons.config.ConfigHelper.ConfigObject<T>
All Implemented Interfaces:
Supplier<T>
Enclosing class:
ConfigHelper

public static class ConfigHelper.ConfigObject<T> extends Object implements Supplier<T>
A config-reload-sensitive wrapper around a config field for a complex object
  • Method Details

    • get

      @Nonnull public T get()
      Specified by:
      get in interface Supplier<T>
    • set

      public void set(T value)
      Sets the config field to a new value and saves the config
      Parameters:
      value - Value to serialize to the config. If object cannot be serialized, an error will be logged and no change will occur.