Fixed ghosts appearing in player list

This commit is contained in:
Anuken
2018-07-05 12:30:29 -04:00
parent c7625278b5
commit 1043a5bb0d

View File

@ -70,9 +70,19 @@ public class PlayerListFragment extends Fragment{
if(!checkmap.containsKey(player) || checkmap.get(player, false) != player.isAdmin){
rebuild = true;
}
checkmap.put(player, player.isAdmin);
}
if(rebuild) rebuild();
for(Player player : checkmap.keys()){
if(!player.isAdded()){
rebuild = true;
}
}
if(rebuild){
rebuild();
checkmap.clear();
for(Player player : playerGroup.all()){
checkmap.put(player, player.isAdmin);
}
}
});
visible(() -> visible);