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