Redid existing disguise commands to make em prettier
This commit is contained in:
@@ -12,15 +12,18 @@ public class UndisguiseCommand implements CommandExecutor {
|
||||
|
||||
@Override
|
||||
public boolean onCommand(CommandSender sender, Command cmd, String label, String[] args) {
|
||||
Player p = (Player) sender;
|
||||
if (sender.getName().equals("CONSOLE")) {
|
||||
sender.sendMessage(ChatColor.RED + "You may not use this command from the console!");
|
||||
return true;
|
||||
}
|
||||
if (sender.hasPermission("libsdisguises.undisguise")) {
|
||||
if (DisguiseAPI.isDisguised(p.getName())) {
|
||||
DisguiseAPI.undisguiseToAll(p);
|
||||
if (DisguiseAPI.isDisguised(sender.getName())) {
|
||||
DisguiseAPI.undisguiseToAll((Player) sender);
|
||||
sender.sendMessage(ChatColor.RED + "You are no longer disguised");
|
||||
} else
|
||||
sender.sendMessage(ChatColor.RED + "You are not disguised!");
|
||||
} else
|
||||
sender.sendMessage(ChatColor.RED + "You do not have permission to use this command.");
|
||||
sender.sendMessage(ChatColor.RED + "You are forbidden to use this command!");
|
||||
return true;
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user