add ginlangs notification message

Signed-off-by: Robinson Gallego <robinson.leal7@gmail.com>
This commit is contained in:
Robinson Gallego 2019-07-31 12:21:21 -04:00
parent ae1701613b
commit 5a59877f24

View File

@ -13,6 +13,7 @@ import org.bukkit.command.CommandSender;
import org.bukkit.entity.Player; import org.bukkit.entity.Player;
import org.bukkit.potion.PotionEffect; import org.bukkit.potion.PotionEffect;
import org.bukkit.potion.PotionEffectType; import org.bukkit.potion.PotionEffectType;
import static me.totalfreedom.totalfreedommod.util.FUtil.playerMsg;
@CommandPermissions(level = Rank.SUPER_ADMIN, source = SourceType.ONLY_IN_GAME) @CommandPermissions(level = Rank.SUPER_ADMIN, source = SourceType.ONLY_IN_GAME)
@CommandParameters(description = "Vanish/unvanish yourself.", usage = "/<command> [-s[ilent]]", aliases = "v") @CommandParameters(description = "Vanish/unvanish yourself.", usage = "/<command> [-s[ilent]]", aliases = "v")
@ -75,9 +76,11 @@ public class Command_vanish extends FreedomCommand
FLog.info(playerSender.getName() + " is now vanished."); FLog.info(playerSender.getName() + " is now vanished.");
for (Player player : server.getOnlinePlayers()) for (Player player : server.getOnlinePlayers())
{ {
if (!plugin.al.isAdmin(player))
{ {
player.hidePlayer(plugin, playerSender); if (plugin.al.isAdmin(player))
playerMsg(player, ChatColor.YELLOW + sender.getName() + " has vanished and is now only visible to admins." );
if (!plugin.al.isAdmin(player))
player.hidePlayer(plugin, playerSender);
} }
} }
plugin.esb.setVanished(playerSender.getName(), true); plugin.esb.setVanished(playerSender.getName(), true);