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.
This commit is contained in:
parent
1a09c14642
commit
ecad60eee3
@ -4,6 +4,7 @@ import mineplex.bungee.lobbyBalancer.LobbyBalancer;
|
|||||||
import mineplex.bungee.motd.MotdManager;
|
import mineplex.bungee.motd.MotdManager;
|
||||||
import mineplex.bungee.playerCount.PlayerCount;
|
import mineplex.bungee.playerCount.PlayerCount;
|
||||||
import mineplex.bungee.playerStats.PlayerStats;
|
import mineplex.bungee.playerStats.PlayerStats;
|
||||||
|
import mineplex.bungee.playerTracker.PlayerTracker;
|
||||||
import mineplex.bungee.status.InternetStatus;
|
import mineplex.bungee.status.InternetStatus;
|
||||||
import net.md_5.bungee.api.plugin.Plugin;
|
import net.md_5.bungee.api.plugin.Plugin;
|
||||||
|
|
||||||
@ -18,5 +19,6 @@ public class Mineplexer extends Plugin
|
|||||||
new FileUpdater(this);
|
new FileUpdater(this);
|
||||||
new PlayerStats(this);
|
new PlayerStats(this);
|
||||||
new InternetStatus(this);
|
new InternetStatus(this);
|
||||||
|
new PlayerTracker(this);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -45,6 +45,6 @@ public class PlayerCount implements Listener, Runnable
|
|||||||
{
|
{
|
||||||
net.md_5.bungee.api.ServerPing serverPing = event.getResponse();
|
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()));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -45,11 +45,17 @@ public class BungeeRotator
|
|||||||
{
|
{
|
||||||
if (usServers.size() < maxRecordCount && server.US)
|
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);
|
System.out.println("SELECTED " + server.Address + " " + (server.US ? "us" : "eu") + " " + server.Players + "/" + server.MaxPlayers);
|
||||||
usServers.add(server.Address);
|
usServers.add(server.Address);
|
||||||
}
|
}
|
||||||
else if (euServers.size() < maxRecordCount && !server.US)
|
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);
|
System.out.println("SELECTED " + server.Address + " " + (server.US ? "us" : "eu") + " " + server.Players + "/" + server.MaxPlayers);
|
||||||
euServers.add(server.Address);
|
euServers.add(server.Address);
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user