update blocked servers hourly
All checks were successful
Deploy App / docker (ubuntu-latest, 2.44.0, 17, 3.8.5) (push) Successful in 2m17s

This commit is contained in:
Lee 2024-04-13 14:03:08 +01:00
parent 4ababb0cb5
commit 5381a2887e

@ -28,6 +28,7 @@ public class MojangService {
private static final String FETCH_BLOCKED_SERVERS = SESSION_SERVER_ENDPOINT + "/blockedservers"; private static final String FETCH_BLOCKED_SERVERS = SESSION_SERVER_ENDPOINT + "/blockedservers";
private static final Splitter DOT_SPLITTER = Splitter.on('.'); private static final Splitter DOT_SPLITTER = Splitter.on('.');
private static final Joiner DOT_JOINER = Joiner.on('.'); private static final Joiner DOT_JOINER = Joiner.on('.');
private static final long FETCH_BLOCKED_SERVERS_INTERVAL = TimeUnit.HOURS.toMillis(1L);
/** /**
* A list of banned server hashes provided by Mojang. * A list of banned server hashes provided by Mojang.
@ -53,7 +54,7 @@ public class MojangService {
public void run() { public void run() {
fetchBlockedServers(); fetchBlockedServers();
} }
}, 0L, 60L * 15L * 1000L); }, 0L, FETCH_BLOCKED_SERVERS_INTERVAL);
} }
/** /**