revamp vanish

This commit is contained in:
speedxx
2020-07-22 17:40:58 -04:00
parent fc05003354
commit 7593fbda9e
19 changed files with 183 additions and 60 deletions

View File

@ -16,6 +16,7 @@ import org.bukkit.potion.PotionEffectType;
@CommandParameters(description = "Shows (optionally clears) invisible players", usage = "/<command> [clear]")
public class Command_invis extends FreedomCommand
{
@Override
public boolean run(CommandSender sender, Player playerSender, Command cmd, String commandLabel, String[] args, boolean senderIsConsole)
{
@ -42,7 +43,7 @@ public class Command_invis extends FreedomCommand
for (Player player : server.getOnlinePlayers())
{
if (player.hasPotionEffect(PotionEffectType.INVISIBILITY) && !plugin.al.vanished.contains(player))
if (player.hasPotionEffect(PotionEffectType.INVISIBILITY) && !plugin.al.isVanished(player.getName()))
{
players.add(player.getName());
if (clear && !plugin.al.isAdmin(player))
@ -75,4 +76,4 @@ public class Command_invis extends FreedomCommand
return Collections.emptyList();
}
}
}