Fixing Team display bug on disbanding.

This commit is contained in:
Sarah 2015-07-31 13:05:28 +02:00
parent 30fa3b3309
commit 60a1768821

View File

@ -5,6 +5,7 @@ import java.util.HashMap;
import java.util.HashSet; import java.util.HashSet;
import java.util.Iterator; import java.util.Iterator;
import mineplex.core.account.CoreClient;
import mineplex.core.common.util.C; import mineplex.core.common.util.C;
import mineplex.core.common.util.F; import mineplex.core.common.util.F;
import mineplex.core.common.util.UtilAlg; import mineplex.core.common.util.UtilAlg;
@ -164,7 +165,13 @@ public class GameTeam
public void DisbandTeam() public void DisbandTeam()
{ {
for (Player player : _players.keySet()) for (Player player : _players.keySet())
{
for(Player other : UtilServer.getPlayers())
{
other.getScoreboard().getTeam(Host.Manager.GetClients().Get(player).GetRank().Name + _name.toUpperCase()).removePlayer(player);
}
UtilPlayer.message(player, F.main("Team", _color + C.Bold + _displayName + " Team was disbanded.")); UtilPlayer.message(player, F.main("Team", _color + C.Bold + _displayName + " Team was disbanded."));
}
_players.clear(); _players.clear();
} }