Merge branch 'master' into schematic
This commit is contained in:
@@ -48,7 +48,7 @@ public class ServerControl implements ApplicationListener{
|
||||
private Fi currentLogFile;
|
||||
private boolean inExtraRound;
|
||||
private Task lastTask;
|
||||
private Gamemode lastMode = Gamemode.survival;
|
||||
private Gamemode lastMode;
|
||||
private @Nullable Map nextMapOverride;
|
||||
private Interval autosaveCount = new Interval();
|
||||
|
||||
@@ -64,6 +64,15 @@ public class ServerControl implements ApplicationListener{
|
||||
"globalrules", "{reactorExplosions: false}" //schematicAllowed: true} //is not working
|
||||
);
|
||||
|
||||
//update log level
|
||||
Config.debug.set(Config.debug.bool());
|
||||
|
||||
try{
|
||||
lastMode = Gamemode.valueOf(Core.settings.getString("lastServerMode", "survival"));
|
||||
}catch(Exception e){ //handle enum parse exception
|
||||
lastMode = Gamemode.survival;
|
||||
}
|
||||
|
||||
Log.setLogger((level, text) -> {
|
||||
String result = "[" + dateTime.format(LocalDateTime.now()) + "] " + format(tags[level.ordinal()] + " " + text + "&fr");
|
||||
System.out.println(result);
|
||||
@@ -159,6 +168,9 @@ public class ServerControl implements ApplicationListener{
|
||||
+ (map.tags.containsKey("author") && !map.tags.get("author").trim().isEmpty() ? " by[accent] " + map.author() + "[white]" : "") + "." +
|
||||
"\nNew game begins in " + roundExtraTime + " seconds.");
|
||||
|
||||
state.gameOver = true;
|
||||
Call.updateGameOver(event.winner);
|
||||
|
||||
info("Selected next map to be @.", map.name());
|
||||
|
||||
play(true, () -> world.loadMap(map, map.applyRules(lastMode)));
|
||||
@@ -298,6 +310,7 @@ public class ServerControl implements ApplicationListener{
|
||||
|
||||
logic.reset();
|
||||
lastMode = preset;
|
||||
Core.settings.put("lastServerMode", lastMode.name());
|
||||
try{
|
||||
world.loadMap(result, result.applyRules(lastMode));
|
||||
state.rules = result.applyRules(preset);
|
||||
|
||||
Reference in New Issue
Block a user