mirror of
https://github.com/AtlasMediaGroup/TotalFreedomMod.git
synced 2024-12-28 12:47:36 +00:00
commit
04fee7d5c1
@ -31,7 +31,7 @@ public class VanishHandler extends FreedomService
|
||||
|
||||
for (Player p : server.getOnlinePlayers())
|
||||
{
|
||||
if (!plugin.sl.isAdmin(player) && plugin.sl.isVanished(p.getName()))
|
||||
if (!plugin.sl.isStaff(player) && plugin.sl.isVanished(p.getName()))
|
||||
{
|
||||
player.hidePlayer(plugin, p);
|
||||
}
|
||||
@ -39,7 +39,7 @@ public class VanishHandler extends FreedomService
|
||||
|
||||
for (Player p : server.getOnlinePlayers())
|
||||
{
|
||||
if (!plugin.sl.isAdmin(p) && plugin.sl.isVanished(player.getName()))
|
||||
if (!plugin.sl.isStaff(p) && plugin.sl.isVanished(player.getName()))
|
||||
{
|
||||
p.hidePlayer(plugin, player);
|
||||
}
|
||||
|
@ -13,7 +13,6 @@ import org.bukkit.command.Command;
|
||||
import org.bukkit.command.CommandSender;
|
||||
import org.bukkit.entity.Player;
|
||||
import org.bukkit.scheduler.BukkitRunnable;
|
||||
import static me.totalfreedom.totalfreedommod.util.FUtil.playerMsg;
|
||||
|
||||
@CommandPermissions(level = Rank.TRIAL_MOD, source = SourceType.ONLY_IN_GAME)
|
||||
@CommandParameters(description = "Vanish/unvanish yourself.", usage = "/<command> [-s[ilent]]", aliases = "v")
|
||||
@ -56,14 +55,11 @@ public class Command_vanish extends FreedomCommand
|
||||
|
||||
plugin.pl.getData(playerSender).setTag(tag);
|
||||
FLog.info(playerSender.getName() + " is no longer vanished.");
|
||||
plugin.sl.messageAllStaff(ChatColor.YELLOW + sender.getName() + " has unvanished and is now visible to everyone.");
|
||||
|
||||
for (Player player : server.getOnlinePlayers())
|
||||
{
|
||||
if (plugin.sl.isAdmin(player))
|
||||
{
|
||||
playerMsg(player, ChatColor.YELLOW + sender.getName() + " has unvanished and is now visible to everyone.");
|
||||
}
|
||||
if (!plugin.sl.isAdmin(player))
|
||||
if (!plugin.sl.isStaff(player))
|
||||
{
|
||||
player.showPlayer(plugin, playerSender);
|
||||
}
|
||||
@ -98,17 +94,13 @@ public class Command_vanish extends FreedomCommand
|
||||
}
|
||||
|
||||
FLog.info(playerSender.getName() + " is now vanished.");
|
||||
plugin.sl.messageAllStaff(ChatColor.YELLOW + sender.getName() + " has vanished and is now only visible to staff members.");
|
||||
|
||||
for (Player player : server.getOnlinePlayers())
|
||||
{
|
||||
if (!plugin.sl.isStaff(player))
|
||||
{
|
||||
if (plugin.sl.isAdmin(player))
|
||||
{
|
||||
playerMsg(player, ChatColor.YELLOW + sender.getName() + " has vanished and is now only visible to admins.");
|
||||
}
|
||||
if (!plugin.sl.isAdmin(player))
|
||||
{
|
||||
player.hidePlayer(plugin, playerSender);
|
||||
}
|
||||
player.hidePlayer(plugin, playerSender);
|
||||
}
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user