Archived
0

Added /acn (seen /sayn)

This commit is contained in:
Pepich
2017-06-11 16:22:07 +02:00
parent 6758acc826
commit 18230db392

View File

@@ -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.