Class LegacyConfigManager

java.lang.Object
studio.magemonkey.codex.config.legacy.LegacyConfigManager

public class LegacyConfigManager extends Object
  • Constructor Details

    • LegacyConfigManager

      public LegacyConfigManager()
  • Method Details

    • loadConfigFile

      public static org.bukkit.configuration.file.FileConfiguration loadConfigFile(File file, @Nullable InputStream defaultFile)
      Loads a given file as a FileConfiguration object. If the file doesn't exist, one will be created and the default values will be added.
      Parameters:
      file - The File to load.
      defaultFile - An InputStream representing the default values for the file. Can be null
      Returns:
      The FileConfiguration parsed from the file.
    • loadConfigFile

      public static org.bukkit.configuration.file.FileConfiguration loadConfigFile(File file, InputStream defaultFile, boolean copyMissing)
      Loads a given file as a FileConfiguration object. If the file doesn't exist, one will be created and the default values will be added.
      This method is special because you can specify whether missing fields will be inserted.
      Parameters:
      file - The File to load.
      defaultFile - An InputStream representing the default values for the file. Can be null
      copyMissing - Whether missing default values from the defaultFile should be copied to the file.
      Returns:
      The FileConfiguration parsed from the file.