From 5381a2887eaebbce45b09055537d89becb42c43a Mon Sep 17 00:00:00 2001 From: Liam Date: Sat, 13 Apr 2024 14:03:08 +0100 Subject: [PATCH] update blocked servers hourly --- src/main/java/cc/fascinated/service/MojangService.java | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/main/java/cc/fascinated/service/MojangService.java b/src/main/java/cc/fascinated/service/MojangService.java index f588c43..f9515f3 100644 --- a/src/main/java/cc/fascinated/service/MojangService.java +++ b/src/main/java/cc/fascinated/service/MojangService.java @@ -28,6 +28,7 @@ public class MojangService { private static final String FETCH_BLOCKED_SERVERS = SESSION_SERVER_ENDPOINT + "/blockedservers"; private static final Splitter DOT_SPLITTER = Splitter.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. @@ -53,7 +54,7 @@ public class MojangService { public void run() { fetchBlockedServers(); } - }, 0L, 60L * 15L * 1000L); + }, 0L, FETCH_BLOCKED_SERVERS_INTERVAL); } /**