update properties on secret key change

This commit is contained in:
Wiewiogr
2018-10-28 18:13:56 +01:00
committed by GitHub
parent 37b7bbff98
commit c8214236ab

View File

@@ -82,6 +82,7 @@ public class GameServer implements Runnable {
secretKey = config.getString("secret_key"); secretKey = config.getString("secret_key");
if (secretKey == null) { if (secretKey == null) {
secretKey = keyGenerator.generate(); secretKey = keyGenerator.generate();
config.setString("secret_key", secretKey);
} }
//Load all plugins in plugins folder, if it doesn't exist, create it //Load all plugins in plugins folder, if it doesn't exist, create it
@@ -325,5 +326,6 @@ public class GameServer implements Runnable {
public void setSecretKey(String secretKey) { public void setSecretKey(String secretKey) {
this.secretKey = secretKey; this.secretKey = secretKey;
config.setString("secret_key", secretKey);
} }
} }