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 -
Method Summary
Modifier and TypeMethodDescriptionvoidonPreConfigSaved(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.voidNot sure why someone would need this, because of config factories existing, but this would be useful for config post-processing on edge cases.
-
Constructor Details
-
ExampleEntryPointListeners
public ExampleEntryPointListeners()
-
-
Method Details
-
PostConfigLoaded
public void PostConfigLoaded()Description copied from interface:PostConfigLoadedListenerNot 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:
PostConfigLoadedin interfacePostConfigLoadedListener
-
onPreConfigSaved
public void onPreConfigSaved(blue.endless.jankson.JsonObject oldValues, blue.endless.jankson.JsonObject newValues) Description copied from interface:PreConfigSavedListenerNew 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:
onPreConfigSavedin interfacePreConfigSavedListener- 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.
-