|
|
|
@ -22,7 +22,7 @@ public class MineThread implements Runnable {
@@ -22,7 +22,7 @@ public class MineThread implements Runnable {
|
|
|
|
|
} |
|
|
|
|
@Override |
|
|
|
|
public void run() { |
|
|
|
|
LocalDateTime nextPulse = LocalDateTime.now().withMinute(0).withSecond(0); |
|
|
|
|
LocalDateTime nextPulse = LocalDateTime.now().withMinute(0).withSecond(0).withNano(0); |
|
|
|
|
while (true){ |
|
|
|
|
if(LocalDateTime.now().isAfter(nextPulse)) { |
|
|
|
|
for (Mine mine : Mine.getMines()) { |
|
|
|
@ -42,7 +42,7 @@ public class MineThread implements Runnable {
@@ -42,7 +42,7 @@ public class MineThread implements Runnable {
|
|
|
|
|
minute = 30; |
|
|
|
|
|
|
|
|
|
LocalDateTime openTime = LocalDateTime.now().withHour(mine.liveTime).withMinute(minute).withSecond(0); |
|
|
|
|
LocalDateTime closeTime = openTime.plusMinutes(30); |
|
|
|
|
LocalDateTime closeTime = openTime.plusMinutes(29); |
|
|
|
|
|
|
|
|
|
//current time is after start time and before close time, open mine window
|
|
|
|
|
if (LocalDateTime.now().isAfter(openTime.minusMinutes(1)) && !mine.wasClaimed && !mine.wasOpened) { |
|
|
|
|