From 23ed34dbf71bfc93be5a758fff9c1094bfd73a83 Mon Sep 17 00:00:00 2001 From: Jaime Martinez Rincon Date: Sun, 23 Apr 2017 22:50:11 +0200 Subject: [PATCH] Added back the print info to server check --- .../java/me/jaimemartz/lobbybalancer/LobbyBalancer.java | 2 +- .../me/jaimemartz/lobbybalancer/ping/StatusManager.java | 6 ++++++ 2 files changed, 7 insertions(+), 1 deletion(-) diff --git a/src/main/java/me/jaimemartz/lobbybalancer/LobbyBalancer.java b/src/main/java/me/jaimemartz/lobbybalancer/LobbyBalancer.java index 533ae01..aa645e0 100644 --- a/src/main/java/me/jaimemartz/lobbybalancer/LobbyBalancer.java +++ b/src/main/java/me/jaimemartz/lobbybalancer/LobbyBalancer.java @@ -193,6 +193,6 @@ public class LobbyBalancer extends Plugin { } public Configuration getConfigHandle() { - return factory.get("config.yml").getHandle(); + return factory.get(0).getHandle(); } } diff --git a/src/main/java/me/jaimemartz/lobbybalancer/ping/StatusManager.java b/src/main/java/me/jaimemartz/lobbybalancer/ping/StatusManager.java index 5264846..c39a1a8 100644 --- a/src/main/java/me/jaimemartz/lobbybalancer/ping/StatusManager.java +++ b/src/main/java/me/jaimemartz/lobbybalancer/ping/StatusManager.java @@ -57,6 +57,12 @@ public class StatusManager { status = new StatusInfo(); } + if (ConfigEntries.SERVER_CHECK_PRINT_INFO.get()) { + plugin.getLogger().info(String.format("Tracking server %s, status: [Description: \"%s\", Online Players: %s, Maximum Players: %s, Accessible: %s]", + server.getName(), status.getDescription(), status.getOnline(), status.getMaximum(), status.isAccessible() + )); + } + status.setOutdated(false); storage.put(server, status); }, plugin);