Package net.mcreator.preferences
Class PreferencesManager
java.lang.Object
net.mcreator.preferences.PreferencesManager
-
Field Summary
Modifier and TypeFieldDescriptionstatic final com.google.gson.Gson
static final org.apache.logging.log4j.Logger
static PreferencesData
MCreator's preferences structure holder -
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionstatic Map
<String, List<PreferencesEntry<?>>> static void
init()
Init the system and load MCreator's preferences, so entries used inside the launcher can be get.static void
Once plugins are loaded, we can now load preferences registered by them withApplicationLoadedEvent
.static void
loadPreferences
(String identifier) Load all preferences registered under the provided .static void
resetFromList
(List<PreferencesEntry<?>> entries) static void
Save 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
-