Fix bug with PlayerCount.

This commit is contained in:
Jonathan Williams 2015-03-13 18:10:35 -07:00
parent cb93769e03
commit d8867711ef

View File

@ -39,12 +39,14 @@ public class PlayerCount implements Listener, Runnable
{
_repository.updateBungeeStatus(new BungeeServer(_listenerInfo.getHost().getAddress().getHostAddress(), _listenerInfo.getHost().getAddress().getHostAddress(), _listenerInfo.getHost().getPort(), _plugin.getProxy().getOnlineCount(), 1250, (int) ((Runtime.getRuntime().maxMemory() - Runtime.getRuntime().freeMemory()) / 1048576), (int) (Runtime.getRuntime().maxMemory() / 1048576)), 15);
_totalPlayers = 0;
int totalPlayers = 0;
for (BungeeServer server : _repository.getGlobalBungeeStatuses())
{
_totalPlayers += server.getPlayerCount();
totalPlayers += server.getPlayerCount();
}
_totalPlayers = totalPlayers;
}
@EventHandler