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:
Sam 2016-06-16 11:39:51 +01:00
parent 9e75cc6224
commit c3a18813ee
1 changed files with 7 additions and 2 deletions

View File

@ -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));