use of com.electronwill.nightconfig.core.file.CommentedFileConfig in project simple-planes by przemykomo.
the class SimplePlanesConfig method loadConfig.
public static void loadConfig(ForgeConfigSpec spec, Path path) {
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 Controller-Support-Mod by Stereowalker.
the class ConfigBuilder method loadConfig.
public static void loadConfig(ForgeConfigSpec config, String path) {
ControllerMod.LOGGER.info("Loading config " + path);
final CommentedFileConfig file = CommentedFileConfig.builder(new File(path)).sync().autosave().writingMode(WritingMode.REPLACE).build();
ControllerMod.LOGGER.info("Built config " + path);
file.load();
ControllerMod.LOGGER.info("Loaded config " + path);
config.setConfig(file);
}
use of com.electronwill.nightconfig.core.file.CommentedFileConfig in project RiddleChests by thraaawn.
the class Config 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 Whitelist-Sync-2 by PotatoSauceVFX.
the class Config 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 CeramicBucket by cech12.
the class ServerConfig 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);
}
Aggregations