Browse Source

Load new config if one does not already exist

Signed-off-by: Ryan Fox <flewkey@2a03.party>
master
Ryan Fox 3 years ago
parent
commit
344940417e
Signed by: flewkey GPG Key ID: 94F56ADFD848851E
  1. 4
      src/party/_2a03/mc/server/Config.java

4
src/party/_2a03/mc/server/Config.java

@ -33,7 +33,9 @@ public class Config {
String jsonRaw = IOUtils.toString(is, "UTF-8");
json = new JSONObject(jsonRaw);
} else {
logger.info("Unable to find config");
logger.info("Config not found, creating one");
json = new JSONObject("{\"spawn\":[0,0,0,0,0,-2],\"members\":[]}");
saveConfig();
}
logger.info("Configuration loaded");
}