Class PreferencesManager

java.lang.Object
net.mcreator.preferences.PreferencesManager

public class PreferencesManager extends Object
  • Field Details

    • LOG

      public static final org.apache.logging.log4j.Logger LOG
    • gson

      public static final com.google.gson.Gson gson
    • PREFERENCES

      public static PreferencesData 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

      public static void loadPreferences(String identifier)

      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

      public static void resetFromList(List<PreferencesEntry<?>> entries)
    • getPreferencesRegistry

      public static Map<String,List<PreferencesEntry<?>>> getPreferencesRegistry()