PC-409
Fixes an issue where the game lobby scoreboard would not account for players in /vanish.
This commit is contained in:
parent
1a9f58451b
commit
df9fe45d7e
@ -1213,6 +1213,11 @@ public class ArcadeManager extends MiniPlugin implements IRelation
|
||||
return _specList.contains(player);
|
||||
}
|
||||
|
||||
public boolean isVanished(Player player)
|
||||
{
|
||||
return _incognitoManager.Get(player).Status;
|
||||
}
|
||||
|
||||
public boolean IsTournamentServer()
|
||||
{
|
||||
return _serverConfig.Tournament;
|
||||
|
@ -1047,6 +1047,15 @@ public class GameLobbyManager implements Listener
|
||||
|
||||
_colorTick = !_colorTick;
|
||||
|
||||
int spectatorCount = 0;
|
||||
|
||||
for(Player players : UtilServer.GetPlayers())
|
||||
{
|
||||
{
|
||||
spectatorCount++;
|
||||
}
|
||||
}
|
||||
|
||||
for (Entry<Player, Scoreboard> entry : _scoreboardMap.entrySet())
|
||||
{
|
||||
Objective objective = entry.getValue().getObjective("§l" + "Lobby");
|
||||
@ -1079,7 +1088,8 @@ public class GameLobbyManager implements Listener
|
||||
// Remove Old
|
||||
entry.getValue().resetScores(_oldPlayerCount + "/" + _oldMaxPlayerCount);
|
||||
// Set new
|
||||
objective.getScore(UtilServer.getPlayers().length + "/" + Manager.GetPlayerFull()).setScore(line--);
|
||||
|
||||
objective.getScore(UtilServer.getPlayers().length - spectatorCount + "/" + Manager.GetPlayerFull()).setScore(line--);
|
||||
|
||||
if (Manager.GetGame() != null)
|
||||
{
|
||||
@ -1150,7 +1160,7 @@ public class GameLobbyManager implements Listener
|
||||
}
|
||||
}
|
||||
|
||||
_oldPlayerCount = UtilServer.getPlayers().length;
|
||||
_oldPlayerCount = UtilServer.getPlayers().length - spectatorCount;
|
||||
_oldMaxPlayerCount = Manager.GetPlayerFull();
|
||||
}
|
||||
|
||||
@ -1364,5 +1374,4 @@ public class GameLobbyManager implements Listener
|
||||
|
||||
event.setCancelled(true);
|
||||
}
|
||||
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user