Version: 2.1.2 Update

This commit is contained in:
AnonymousUser
2021-10-23 00:00:20 +08:00
parent f7b2e99eb2
commit e747011ec0

View File

@@ -25,10 +25,6 @@ public class LoadConfig {
File yamlSetting = new File(SettingPath); File yamlSetting = new File(SettingPath);
if (!(yamlSetting.exists() && yamlSetting.isFile())) { if (!(yamlSetting.exists() && yamlSetting.isFile())) {
initSetting(); initSetting();
}
yamlSetting = new File(ConfigPath);
if (!(yamlSetting.exists() && yamlSetting.isFile())) {
initRules(); initRules();
} }
} }
@@ -71,8 +67,7 @@ public class LoadConfig {
representer.addClassTag(Config.class, Tag.MAP); representer.addClassTag(Config.class, Tag.MAP);
Yaml yaml = new Yaml(new Constructor(),representer,dop); Yaml yaml = new Yaml(new Constructor(),representer,dop);
new LoadConfig(); File f = new File(ConfigPath);
File f = new File(getConfigPath());
try{ try{
Writer ws = new OutputStreamWriter(new FileOutputStream(f), StandardCharsets.UTF_8); Writer ws = new OutputStreamWriter(new FileOutputStream(f), StandardCharsets.UTF_8);
yaml.dump(config,ws); yaml.dump(config,ws);