Package net.mcreator.preferences
Class PreferencesManager
java.lang.Object
net.mcreator.preferences.PreferencesManager
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final com.google.gson.Gsonstatic final org.apache.logging.log4j.Loggerstatic PreferencesDataMCreator's preferences structure holder -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic Map<String, List<PreferencesEntry<?>>> static voidinit()Init the system and load MCreator's preferences, so entries used inside the launcher can be get.static voidOnce plugins are loaded, we can now load preferences registered by them withApplicationLoadedEvent.static voidloadPreferences(String identifier) Load all preferences registered under the provided .static voidresetFromList(List<PreferencesEntry<?>> entries) static voidSave preferences of all identifiers registered inside PREFERENCES_REGISTRY.
-
Field Details
-
LOG
public static final org.apache.logging.log4j.Logger LOG -
gson
public static final com.google.gson.Gson gson -
PREFERENCES
MCreator's preferences structure holder
-
-
Constructor Details
-
PreferencesManager
public PreferencesManager()
-
-
Method Details
-
init
public static void init()Init the system and load MCreator's preferences, so entries used inside the launcher can be get.
-
initNonCore
public static void initNonCore()Once plugins are loaded, we can now load preferences registered by them with
ApplicationLoadedEvent. -
loadPreferences
Load all preferences registered under the provided .
- Parameters:
identifier-The identifier used to get the preference file to load
-
savePreferences
public static void savePreferences()Save preferences of all identifiers registered inside PREFERENCES_REGISTRY.
-
resetFromList
-
getPreferencesRegistry
-