Skip to content

Instantly share code, notes, and snippets.

@Niall7459
Niall7459 / CleanCommandSay.java
Created Mar 26, 2015
CleanCommandSay.java [Say Command] [CommandBook]
View CleanCommandSay.java
@Command(aliases = {"say"}, usage = "<message...>", desc = "Send a message", min = 1, max = -1)
@CommandPermissions({"commandbook.say"})
public void say(CommandContext args, CommandSender sender) throws CommandException {
if (sender instanceof Player && sessions.getSession(AdministrativeSession.class, (Player) sender).isMute()) {
sender.sendMessage(ChatColor.RED + "You are muted.");
return;
}
String msg = args.getJoinedStrings(0);