Intégration et gestion des mute et des vanish dans le plugin
This commit is contained in:
@@ -1,6 +1,7 @@
|
||||
package net.mc_pandacraft.java.plugin.pandacraftutils.simple_commands.me;
|
||||
|
||||
import net.mc_pandacraft.java.plugin.pandacraftutils.PandacraftUtils;
|
||||
import net.mc_pandacraft.java.plugin.pandacraftutils.plugin_interface.EssentialsInterface;
|
||||
|
||||
import org.apache.commons.lang.StringUtils;
|
||||
import org.bukkit.ChatColor;
|
||||
@@ -24,9 +25,15 @@ public class CommandMe implements CommandExecutor {
|
||||
public boolean onCommand(CommandSender sender, Command cmd, String label, String[] args) {
|
||||
if (args.length == 0) return false;
|
||||
|
||||
|
||||
String name;
|
||||
if (sender instanceof Player)
|
||||
{
|
||||
// pas de /me pour les mute
|
||||
if (EssentialsInterface.isPlayerMuted((Player)sender)) return true;
|
||||
|
||||
name = ((Player)sender).getDisplayName()+ChatColor.RESET+" "+ChatColor.ITALIC;
|
||||
}
|
||||
else if (sender instanceof ConsoleCommandSender
|
||||
|| sender instanceof RemoteConsoleCommandSender)
|
||||
name = ChatColor.ITALIC+"Le serveur ";
|
||||
|
Reference in New Issue
Block a user