use of com.electronwill.nightconfig.core.file.CommentedFileConfig in project Geolosys by oitsjustjose.
the class ClientConfig method loadConfig.
public static void loadConfig(ForgeConfigSpec spec, Path path) {
final CommentedFileConfig configData = CommentedFileConfig.builder(path).sync().autosave().writingMode(WritingMode.REPLACE).build();
configData.load();
spec.setConfig(configData);
}
use of com.electronwill.nightconfig.core.file.CommentedFileConfig in project MC-Prefab by Brian-Wuest.
the class ModConfiguration method loadConfig.
public static void loadConfig(ForgeConfigSpec spec, Path path) {
Prefab.LOGGER.debug("Loading config file {}", path);
ModConfiguration.SPEC = spec;
final CommentedFileConfig configData = CommentedFileConfig.builder(path).sync().autosave().writingMode(WritingMode.REPLACE).build();
Prefab.LOGGER.info("Built TOML config for {}", path.toString());
configData.load();
Prefab.LOGGER.info("Loaded TOML config file {}", path.toString());
spec.setConfig(configData);
ModConfiguration.UpdateServerConfig();
}
use of com.electronwill.nightconfig.core.file.CommentedFileConfig in project PrimalMagick by daedalus4096.
the class Config method loadConfig.
protected static void loadConfig(ForgeConfigSpec spec, Path path) {
final CommentedFileConfig configData = CommentedFileConfig.builder(path).sync().autosave().writingMode(WritingMode.REPLACE).build();
configData.load();
spec.setConfig(configData);
}
use of com.electronwill.nightconfig.core.file.CommentedFileConfig in project Growthcraft-1.16 by GrowthcraftCE.
the class GrowthcraftConfig method loadConfig.
public static void loadConfig(ForgeConfigSpec configSpec, String path) {
final CommentedFileConfig fileConfig = CommentedFileConfig.builder(new File(path)).sync().autosave().writingMode(WritingMode.REPLACE).build();
fileConfig.load();
configSpec.setConfig(fileConfig);
}
use of com.electronwill.nightconfig.core.file.CommentedFileConfig in project Growthcraft-1.16 by GrowthcraftCE.
the class GrowthcraftApiaryConfig method loadConfig.
public static void loadConfig(ForgeConfigSpec configSpec, String path) {
final CommentedFileConfig fileConfig = CommentedFileConfig.builder(new File(path)).sync().autosave().writingMode(WritingMode.REPLACE).build();
fileConfig.load();
configSpec.setConfig(fileConfig);
}
Aggregations