use of com.electronwill.nightconfig.core.file.CommentedFileConfig in project forge-autofish by North-West-Wind.
the class Config method loadConfig.
public static void loadConfig(String path) {
final CommentedFileConfig file = CommentedFileConfig.builder(new File(path)).sync().autosave().writingMode(WritingMode.REPLACE).build();
file.load();
CLIENT.setConfig(file);
}
use of com.electronwill.nightconfig.core.file.CommentedFileConfig in project Cyclic by Lothrazar.
the class ConfigRegistry method setup.
public static void setup() {
final CommentedFileConfig configData = CommentedFileConfig.builder(FMLPaths.CONFIGDIR.get().resolve(ModCyclic.MODID + ".toml")).sync().autosave().writingMode(WritingMode.REPLACE).build();
configData.load();
COMMON_CONFIG.setConfig(configData);
}
use of com.electronwill.nightconfig.core.file.CommentedFileConfig in project Universal-Grid by starforcraft.
the class Config method loadConfig.
public static void loadConfig(ForgeConfigSpec config, String path) {
UniversalGrid.LOGGER.info("Loading config: " + path);
final CommentedFileConfig file = CommentedFileConfig.builder(new File(path)).sync().autosave().writingMode(WritingMode.REPLACE).build();
UniversalGrid.LOGGER.info("Built config: " + path);
file.load();
UniversalGrid.LOGGER.info("Loaded config: " + path);
config.setConfig(file);
}
use of com.electronwill.nightconfig.core.file.CommentedFileConfig in project BrickFurnace 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);
}
use of com.electronwill.nightconfig.core.file.CommentedFileConfig in project UsefulHats 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