Add server state mapping for web integration.

This commit is contained in:
2026-08-09 00:28:21 +02:00
parent 5eb470cfb6
commit e72f79cb29
4 changed files with 18 additions and 11 deletions
@@ -20,13 +20,13 @@ import java.util.concurrent.*;
@Slf4j
public class ChatLogHandler {
private final WebHandler webHandler = new WebHandler();
private final WebHandler webHandler;
private static ChatLogHandler instance = null;
private ScheduledExecutorService executorService = null;
public static ChatLogHandler getInstance(boolean enableLogging) {
public static ChatLogHandler getInstance(WebHandler webHandler, boolean enableLogging) {
if (instance == null) {
instance = new ChatLogHandler(enableLogging);
instance = new ChatLogHandler(webHandler, enableLogging);
}
return instance;
}
@@ -35,7 +35,8 @@ public class ChatLogHandler {
private final Queue<ChatLog> chatLogQueue = new ConcurrentLinkedQueue<>();
private final HashMap<UUID, List<ChatLog>> chatLogs = new HashMap<>();
public ChatLogHandler(boolean enableLogging) {
public ChatLogHandler(WebHandler webHandler, boolean enableLogging) {
this.webHandler = webHandler;
if (!enableLogging) {
ALogger.info("Logging is not enabled on this server.");
return;