PC-555
Fixes an issue where vanished players would show up in the "Give Co-Host" and "Remove player" menus in MPS.
This commit is contained in:
parent
9e75cc6224
commit
c3a18813ee
|
@ -44,7 +44,12 @@ public abstract class PlayerPage extends BasePage
|
|||
players = new ArrayList<>();
|
||||
for (String s : _players)
|
||||
{
|
||||
players.add(Bukkit.getPlayer(s));
|
||||
Player player = Bukkit.getPlayer(s);
|
||||
|
||||
if (!_plugin.isVanished(player))
|
||||
{
|
||||
players.add(player);
|
||||
}
|
||||
}
|
||||
}
|
||||
else
|
||||
|
@ -56,7 +61,7 @@ public abstract class PlayerPage extends BasePage
|
|||
int slot = 9;
|
||||
for (Player player : players)
|
||||
{
|
||||
if (showPlayer(player))
|
||||
if (showPlayer(player) && !_plugin.isVanished(player))
|
||||
{
|
||||
ItemStack head = getPlayerHead(player.getName(), C.cGreen + C.Bold + player.getName(), new String[]{ ChatColor.RESET + C.cGray + getDisplayString(player) });
|
||||
addButton(slot, head, new Button(slot, player));
|
||||
|
|
Loading…
Reference in New Issue