From ecad60eee305d95357ffebc599a62a9a91f8b53e Mon Sep 17 00:00:00 2001 From: Jonathan Williams Date: Wed, 5 Nov 2014 14:40:40 -0800 Subject: [PATCH] Added PlayerTracker to Mineplexer Changed how max players is displayed in Mineplexer Added a cut-off of 900 players for each bungee in BungeeRotator, minimum of two records. --- .../src/mineplex/bungee/Mineplexer.java | 2 ++ .../src/mineplex/bungee/playerCount/PlayerCount.java | 2 +- .../src/mineplex/bungee/BungeeRotator.java | 6 ++++++ 3 files changed, 9 insertions(+), 1 deletion(-) diff --git a/Plugins/Mineplex.Bungee.Mineplexer/src/mineplex/bungee/Mineplexer.java b/Plugins/Mineplex.Bungee.Mineplexer/src/mineplex/bungee/Mineplexer.java index cd6d44ecf..2a82089f7 100644 --- a/Plugins/Mineplex.Bungee.Mineplexer/src/mineplex/bungee/Mineplexer.java +++ b/Plugins/Mineplex.Bungee.Mineplexer/src/mineplex/bungee/Mineplexer.java @@ -4,6 +4,7 @@ import mineplex.bungee.lobbyBalancer.LobbyBalancer; import mineplex.bungee.motd.MotdManager; import mineplex.bungee.playerCount.PlayerCount; import mineplex.bungee.playerStats.PlayerStats; +import mineplex.bungee.playerTracker.PlayerTracker; import mineplex.bungee.status.InternetStatus; import net.md_5.bungee.api.plugin.Plugin; @@ -18,5 +19,6 @@ public class Mineplexer extends Plugin new FileUpdater(this); new PlayerStats(this); new InternetStatus(this); + new PlayerTracker(this); } } diff --git a/Plugins/Mineplex.Bungee.Mineplexer/src/mineplex/bungee/playerCount/PlayerCount.java b/Plugins/Mineplex.Bungee.Mineplexer/src/mineplex/bungee/playerCount/PlayerCount.java index 401b80c80..1f02f7c92 100644 --- a/Plugins/Mineplex.Bungee.Mineplexer/src/mineplex/bungee/playerCount/PlayerCount.java +++ b/Plugins/Mineplex.Bungee.Mineplexer/src/mineplex/bungee/playerCount/PlayerCount.java @@ -45,6 +45,6 @@ public class PlayerCount implements Listener, Runnable { net.md_5.bungee.api.ServerPing serverPing = event.getResponse(); - event.setResponse(new net.md_5.bungee.api.ServerPing(serverPing.getVersion(), new Players(_totalMaxPlayers, _totalPlayers, null), serverPing.getDescription(), serverPing.getFaviconObject())); + event.setResponse(new net.md_5.bungee.api.ServerPing(serverPing.getVersion(), new Players(_totalPlayers + 1, _totalPlayers, null), serverPing.getDescription(), serverPing.getFaviconObject())); } } diff --git a/Plugins/Mineplex.BungeeRotator/src/mineplex/bungee/BungeeRotator.java b/Plugins/Mineplex.BungeeRotator/src/mineplex/bungee/BungeeRotator.java index 4b639dbc6..2b8c2d3ea 100644 --- a/Plugins/Mineplex.BungeeRotator/src/mineplex/bungee/BungeeRotator.java +++ b/Plugins/Mineplex.BungeeRotator/src/mineplex/bungee/BungeeRotator.java @@ -45,11 +45,17 @@ public class BungeeRotator { if (usServers.size() < maxRecordCount && server.US) { + if (usServers.size() >= 2 && server.Players > 900) + continue; + System.out.println("SELECTED " + server.Address + " " + (server.US ? "us" : "eu") + " " + server.Players + "/" + server.MaxPlayers); usServers.add(server.Address); } else if (euServers.size() < maxRecordCount && !server.US) { + if (euServers.size() >= 2 && server.Players > 900) + continue; + System.out.println("SELECTED " + server.Address + " " + (server.US ? "us" : "eu") + " " + server.Players + "/" + server.MaxPlayers); euServers.add(server.Address); }