Fix bug with PlayerCount.
This commit is contained in:
parent
cb93769e03
commit
d8867711ef
@ -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
|
||||
|
Loading…
Reference in New Issue
Block a user