From 4e0c91c26d856aece55ec48ec47b17058746738a Mon Sep 17 00:00:00 2001 From: Jonathan Williams Date: Sat, 13 Dec 2014 20:22:01 -0500 Subject: [PATCH] Adjusted limit on CC game. --- .../src/mineplex/servermonitor/ServerMonitor.java | 14 +++++++++++--- 1 file changed, 11 insertions(+), 3 deletions(-) diff --git a/Plugins/Mineplex.ServerMonitor/src/mineplex/servermonitor/ServerMonitor.java b/Plugins/Mineplex.ServerMonitor/src/mineplex/servermonitor/ServerMonitor.java index 48aa01d8b..4f6079edf 100644 --- a/Plugins/Mineplex.ServerMonitor/src/mineplex/servermonitor/ServerMonitor.java +++ b/Plugins/Mineplex.ServerMonitor/src/mineplex/servermonitor/ServerMonitor.java @@ -40,11 +40,12 @@ public class ServerMonitor private static Logger _logger = Logger.getLogger("ServerMonitor"); private static int _totalPlayers = 0; + private static Region _region; public static void main (String args[]) { - Region region = !new File("eu.dat").exists() ? Region.US : Region.EU; - _repository = ServerManager.getServerRepository(region); // Fetches and connects to server repo + _region = !new File("eu.dat").exists() ? Region.US : Region.EU; + _repository = ServerManager.getServerRepository(_region); // Fetches and connects to server repo File logFile = new File("monitor.log"); @@ -281,7 +282,14 @@ public class ServerMonitor } else if (serverGroup.getName().equalsIgnoreCase("Halloween")) { - if (serverGroup.getServers().size() > 250) + if (serverGroup.getServers().size() > (_region == Region.US ? 300 : 100)) + { + serversToAdd = 0; + } + } + else if (serverGroup.getName().equalsIgnoreCase("Christmas")) + { + if (serverGroup.getServers().size() > (_region == Region.US ? 300 : 100)) { serversToAdd = 0; }