|
|
@ -210,15 +210,6 @@ public class WorldServer { |
|
|
|
this.isRunning = true; |
|
|
|
this.isRunning = true; |
|
|
|
|
|
|
|
|
|
|
|
while (true) { |
|
|
|
while (true) { |
|
|
|
if(LocalDateTime.now().getHour() == 2 && LocalDateTime.now().getMinute() == 0){ |
|
|
|
|
|
|
|
//daily reboot
|
|
|
|
|
|
|
|
try { |
|
|
|
|
|
|
|
Runtime rt = Runtime.getRuntime(); |
|
|
|
|
|
|
|
rt.exec("./mbrestart.sh"); |
|
|
|
|
|
|
|
} catch (java.io.IOException err) { |
|
|
|
|
|
|
|
Logger.info(err.getMessage()); |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
if (LocalDateTime.now().isAfter(nextHeartbeatTime)) { |
|
|
|
if (LocalDateTime.now().isAfter(nextHeartbeatTime)) { |
|
|
|
SERVERHEARTBEAT.tick(); |
|
|
|
SERVERHEARTBEAT.tick(); |
|
|
|