getLogger().error("There was an error while trying to load the configuration from config.json. Please make sure that there are no syntax errors. If you want to start with a default configuration, delete your existing config.json.");
getLogger().error("There was an error while trying to load the configuration from config.json. Please make sure that there are no syntax errors. If you want to start with a default configuration, delete your existing config.json.");
System.exit(1);
System.exit(1);
...
@@ -220,7 +218,7 @@ public final class Grasscutter {
...
@@ -220,7 +218,7 @@ public final class Grasscutter {
if(config==null)config=newConfigContainer();
if(config==null)config=newConfigContainer();
try(FileWriterfile=newFileWriter(configFile)){
try(FileWriterfile=newFileWriter(configFile)){
file.write(gson.toJson(config));
file.write(Utils.jsonEncode(config));
}catch(IOExceptionignored){
}catch(IOExceptionignored){
Grasscutter.getLogger().error("Unable to write to config file.");
Grasscutter.getLogger().error("Unable to write to config file.");
}catch(Exceptione){
}catch(Exceptione){
...
@@ -272,8 +270,9 @@ public final class Grasscutter {
...
@@ -272,8 +270,9 @@ public final class Grasscutter {