Class LegacyConfigManager
java.lang.Object
studio.magemonkey.codex.config.legacy.LegacyConfigManager
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic org.bukkit.configuration.file.FileConfigurationloadConfigFile(File file, InputStream defaultFile) Loads a given file as aFileConfigurationobject.static org.bukkit.configuration.file.FileConfigurationloadConfigFile(File file, InputStream defaultFile, boolean copyMissing) Loads a given file as aFileConfigurationobject.
-
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 aFileConfigurationobject. 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 aFileConfigurationobject. 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 nullcopyMissing- Whether missing default values from the defaultFile should be copied to the file.- Returns:
- The FileConfiguration parsed from the file.
-