diff --git a/src/com/redstoner/modules/adminchat/Adminchat.java b/src/com/redstoner/modules/adminchat/Adminchat.java index 9fb529a..1887f5c 100644 --- a/src/com/redstoner/modules/adminchat/Adminchat.java +++ b/src/com/redstoner/modules/adminchat/Adminchat.java @@ -24,7 +24,7 @@ import com.redstoner.modules.Module; * * @author Pepich */ @AutoRegisterListener -@Version(major = 2, minor = 0, revision = 1, compatible = 2) +@Version(major = 2, minor = 0, revision = 2, compatible = 2) public class Adminchat implements Module, Listener { private static final char defaultKey = ','; @@ -56,6 +56,14 @@ public class Adminchat implements Module, Listener " run ac_msg message;\n" + " }\n" + "}\n" + + "command acn {\n" + + " [string:name] [string:message...] {\n" + + " help Sends a message in Admin Chat;\n" + + " perm utils.ac;\n" + + " type console;\n" + + " run acn_msg name message;\n" + + " }\n" + + "}\n" + " \n" + "command ackey {\n" + " [string:key] {\n" + @@ -105,6 +113,20 @@ public class Adminchat implements Module, Listener return true; } + @Command(hook = "acn_msg") + public boolean acnSay(CommandSender sender, String name, String message) + { + Utils.broadcast("§8[§cAC§8] §9" + name + "§8: §b", message, new BroadcastFilter() + { + @Override + public boolean sendTo(CommandSender recipient) + { + return recipient.hasPermission("utils.ac"); + } + }, '&'); + return true; + } + /** Let's a Player toggle their auto-cg status to allow for automatically sending chat messages to their chatgroup. * * @param sender the issuer of the command.