From 5a59877f24267078df21daf8c810fc8fca453719 Mon Sep 17 00:00:00 2001 From: Robinson Gallego Date: Wed, 31 Jul 2019 12:21:21 -0400 Subject: [PATCH] add ginlangs notification message Signed-off-by: Robinson Gallego --- .../totalfreedommod/command/Command_vanish.java | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/src/main/java/me/totalfreedom/totalfreedommod/command/Command_vanish.java b/src/main/java/me/totalfreedom/totalfreedommod/command/Command_vanish.java index 3a47aff6..a29a2d16 100644 --- a/src/main/java/me/totalfreedom/totalfreedommod/command/Command_vanish.java +++ b/src/main/java/me/totalfreedom/totalfreedommod/command/Command_vanish.java @@ -13,6 +13,7 @@ import org.bukkit.command.CommandSender; import org.bukkit.entity.Player; import org.bukkit.potion.PotionEffect; import org.bukkit.potion.PotionEffectType; +import static me.totalfreedom.totalfreedommod.util.FUtil.playerMsg; @CommandPermissions(level = Rank.SUPER_ADMIN, source = SourceType.ONLY_IN_GAME) @CommandParameters(description = "Vanish/unvanish yourself.", usage = "/ [-s[ilent]]", aliases = "v") @@ -75,9 +76,11 @@ public class Command_vanish extends FreedomCommand FLog.info(playerSender.getName() + " is now vanished."); 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);