|
|
@ -210,6 +210,11 @@ public class WorldServer { |
|
|
|
this.isRunning = true; |
|
|
|
this.isRunning = true; |
|
|
|
|
|
|
|
|
|
|
|
while (true) { |
|
|
|
while (true) { |
|
|
|
|
|
|
|
if (LocalDateTime.now().isAfter(nextHeartbeatTime)) { |
|
|
|
|
|
|
|
SERVERHEARTBEAT.tick(); |
|
|
|
|
|
|
|
nextHeartbeatTime = LocalDateTime.now().plusNanos(50000000); |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
LocalDateTime currentTime = LocalDateTime.now(); |
|
|
|
LocalDateTime currentTime = LocalDateTime.now(); |
|
|
|
if(currentTime.getHour() == 2 && currentTime.getMinute() == 0){ |
|
|
|
if(currentTime.getHour() == 2 && currentTime.getMinute() == 0){ |
|
|
|
//daily reboot
|
|
|
|
//daily reboot
|
|
|
@ -220,10 +225,6 @@ public class WorldServer { |
|
|
|
Logger.info(err.getMessage()); |
|
|
|
Logger.info(err.getMessage()); |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
if (LocalDateTime.now().isAfter(nextHeartbeatTime)) { |
|
|
|
|
|
|
|
SERVERHEARTBEAT.tick(); |
|
|
|
|
|
|
|
nextHeartbeatTime = LocalDateTime.now().plusNanos(50000000); |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
if (LocalDateTime.now().isAfter(nextPopulationFileTime)) { |
|
|
|
if (LocalDateTime.now().isAfter(nextPopulationFileTime)) { |
|
|
|
writePopulationFile(); |
|
|
|
writePopulationFile(); |
|
|
|