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

@ -303,9 +303,12 @@ public abstract class FreedomCommand implements CommandExecutor, TabCompleter
protected Player getPlayer(String name, Boolean nullVanished)
{
Player player = Bukkit.getPlayer(name);
if (nullVanished && plugin.al.vanished.contains(player) && !plugin.al.isAdmin(sender))
if (player != null)
{
return null;
if (nullVanished && plugin.al.isVanished(player.getName()) && !plugin.al.isAdmin(sender))
{
return null;
}
}
return player;
}
@ -341,4 +344,4 @@ public abstract class FreedomCommand implements CommandExecutor, TabCompleter
return null;
}
}
}
}