Class CompatSnapshots
java.lang.Object
org.polyfrost.oneconfig.api.config.v1.CompatSnapshots
- All Implemented Interfaces:
ConfigManager.ProfileChangeListener
@Internal
public final class CompatSnapshots
extends Object
implements ConfigManager.ProfileChangeListener
-
Field Summary
Fields -
Method Summary
Modifier and TypeMethodDescriptionstatic voidcapture(org.polyfrost.oneconfig.api.config.v1.Tree tree) static booleanvoidonProfileChanged(String newProfile) voidonProfileCreated(String profile) voidonProfileDeleted(String profile) voidonProfileRenamed(String oldProfile, String newProfile) voidonProfileSaving(String profile) static org.polyfrost.oneconfig.api.config.v1.Treeregister(org.polyfrost.oneconfig.api.config.v1.Tree tree) static voidsetDispatcher(Consumer<Runnable> dispatcher) static voidsetLiveValueScope(BiConsumer<String, Runnable> scope) Sets what every read of the live option values runs inside
Lets whoever temporarily overwrites a mod's options put the user's own values back for the duration, so the substitutes are never mistaken for themstatic org.polyfrost.oneconfig.api.config.v1.Treetrack(org.polyfrost.oneconfig.api.config.v1.Tree registered) static voidstatic voidwithLiveValues(String id, Runnable action) Runsactionwith the options of the configidholding what the user chose, seesetLiveValueScope(java.util.function.BiConsumer<java.lang.String, java.lang.Runnable>)Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface org.polyfrost.oneconfig.api.config.v1.ConfigManager.ProfileChangeListener
onProfileOperationFinished, onProfileSpecificControlsChanged, onProfileUnloading
-
Field Details
-
INSTANCE
-
SNAPSHOT_METADATA
- See Also:
-
CUSTOM_RESET_METADATA
- See Also:
-
KEY_METADATA
- See Also:
-
NO_SNAPSHOT_META
- See Also:
-
GATE_METADATA
- See Also:
-
-
Method Details
-
isApplying
public static boolean isApplying() -
setDispatcher
-
setLiveValueScope
Sets what every read of the live option values runs inside
Lets whoever temporarily overwrites a mod's options put the user's own values back for the duration, so the substitutes are never mistaken for them -
withLiveValues
Runsactionwith the options of the configidholding what the user chose, seesetLiveValueScope(java.util.function.BiConsumer<java.lang.String, java.lang.Runnable>) -
register
public static org.polyfrost.oneconfig.api.config.v1.Tree register(org.polyfrost.oneconfig.api.config.v1.Tree tree) -
track
public static org.polyfrost.oneconfig.api.config.v1.Tree track(org.polyfrost.oneconfig.api.config.v1.Tree registered) -
untrack
-
onProfileChanged
- Specified by:
onProfileChangedin interfaceConfigManager.ProfileChangeListener
-
onProfileSaving
- Specified by:
onProfileSavingin interfaceConfigManager.ProfileChangeListener
-
onProfileCreated
- Specified by:
onProfileCreatedin interfaceConfigManager.ProfileChangeListener
-
onProfileRenamed
- Specified by:
onProfileRenamedin interfaceConfigManager.ProfileChangeListener
-
onProfileDeleted
- Specified by:
onProfileDeletedin interfaceConfigManager.ProfileChangeListener
-
capture
public static void capture(org.polyfrost.oneconfig.api.config.v1.Tree tree)
-