/** * * GOD - allows player to ignore incomming damage * * @param sender * @param args * @return */ public static Boolean run(CommandSender sender, String alias, String[] args) { if (PlayerHelper.checkIsPlayer(sender) && !Utils.checkCommandSpam((Player) sender, "god")) { // check if we have any parameters if ((args.length == 0) && Permissions.checkPerms((Player) sender, "cex.god") || (args.length > 0) && Permissions.checkPerms((Player) sender, "cex.god.others")) { god(sender, args, "god", alias); } } return true; }
/** * * UNMUTE - unmutes a player * * @param sender * @param args * @return */ public static Boolean run(CommandSender sender, String alias, String[] args) { // check if we have any parameters if (args.length > 0) { // check permissions and roll it :) Boolean hasPerms = true; if (sender instanceof Player) { hasPerms = Permissions.checkPerms((Player) sender, "cex.unmute"); } // permissions ok, mute the player if (hasPerms) { unmute(sender, args, "unmute", alias); } } else { // show usage Commands.showCommandHelpAndUsage(sender, "cex_unmute", alias); } return true; }