Add server state mapping for web integration.
This commit is contained in:
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user