Class ExampleEntryPointListeners

java.lang.Object
net.glasslauncher.mods.api.gcapi.impl.example.ExampleEntryPointListeners
All Implemented Interfaces:
PostConfigLoadedListener, PreConfigSavedListener

public class ExampleEntryPointListeners extends Object implements PreConfigSavedListener, PostConfigLoadedListener
  • Constructor Summary

    Constructors
    Constructor
    Description
     
  • Method Summary

    Modifier and Type
    Method
    Description
    void
    onPreConfigSaved(blue.endless.jankson.JsonObject oldValues, blue.endless.jankson.JsonObject newValues)
    New values are already applied, this is so you can revert invalid values or do some config post-processing.
    void
    Not sure why someone would need this, because of config factories existing, but this would be useful for config post-processing on edge cases.

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Constructor Details

    • ExampleEntryPointListeners

      public ExampleEntryPointListeners()
  • Method Details

    • PostConfigLoaded

      public void PostConfigLoaded()
      Description copied from interface: PostConfigLoadedListener
      Not sure why someone would need this, because of config factories existing, but this would be useful for config post-processing on edge cases.
      Specified by:
      PostConfigLoaded in interface PostConfigLoadedListener
    • onPreConfigSaved

      public void onPreConfigSaved(blue.endless.jankson.JsonObject oldValues, blue.endless.jankson.JsonObject newValues)
      Description copied from interface: PreConfigSavedListener
      New values are already applied, this is so you can revert invalid values or do some config post-processing. Called before config is saved to file. You can modify newValues to modify what is saved to file. This entrypoint is called once for just your mod. Do not use to modify other mod's configs.
      Specified by:
      onPreConfigSaved in interface PreConfigSavedListener
      Parameters:
      oldValues - the values that were in the config file BEFORE the new values were applied. !!May be incomplete or empty!!
      newValues - the values that are about to be saved to the config file.