Fix logic in server timeout check
This commit is contained in:
parent
e52d451fa1
commit
3dad944ca3
@ -69,8 +69,8 @@ public final class Server {
|
|||||||
for (Server server : serverCache) {
|
for (Server server : serverCache) {
|
||||||
int lastUpdatedAgo = TimeUtils.getSecondsBetween(server.getLastUpdatedAt(), Instant.now());
|
int lastUpdatedAgo = TimeUtils.getSecondsBetween(server.getLastUpdatedAt(), Instant.now());
|
||||||
|
|
||||||
if (lastUpdatedAgo < 60 || lastUpdatedAgo > 30 * 5) {
|
if (lastUpdatedAgo < 60 || server.getPlayers().isEmpty()) {
|
||||||
return;
|
continue;
|
||||||
}
|
}
|
||||||
|
|
||||||
for (UUID online : server.getPlayers()) {
|
for (UUID online : server.getPlayers()) {
|
||||||
|
Loading…
Reference in New Issue
Block a user