this is how you properly silence bells

This commit is contained in:
ZeroEpoch1969
2019-07-30 21:35:41 -07:00
parent 95ef7d6cfe
commit 9cb4bd7822
9 changed files with 52 additions and 91 deletions

View File

@ -1,10 +1,12 @@
package me.totalfreedom.totalfreedommod.command;
import me.totalfreedom.totalfreedommod.rank.Rank;
import me.totalfreedom.totalfreedommod.util.FUtil;
import org.apache.commons.lang.StringUtils;
import org.bukkit.command.Command;
import org.bukkit.command.CommandSender;
import org.bukkit.entity.Player;
import org.bukkit.ChatColor;
@CommandPermissions(level = Rank.SUPER_ADMIN, source = SourceType.BOTH, blockHostConsole = true)
@CommandParameters(description = "Send a command as someone else.", usage = "/<command> <fromname> <outcommand>")
@ -27,6 +29,12 @@ public class Command_gcmd extends FreedomCommand
return true;
}
if (!FUtil.isExecutive(sender.getName()) && plugin.al.isAdmin(player))
{
msg("Only Executives may use this command on admins", ChatColor.RED);
return true;
}
final String outCommand = StringUtils.join(args, " ", 1, args.length);
if (plugin.cb.isCommandBlocked(outCommand, sender))