summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorKHobbits <rob@khobbits.co.uk>2013-01-20 20:54:44 +0000
committerKHobbits <rob@khobbits.co.uk>2013-01-20 20:58:05 +0000
commitd9ab62fe987e34fe49b8e8e4bdd3bd235bda7966 (patch)
tree047a6affe12d23a02119ccd12965aaf2bdabbb45
parent3f38677952ec0e22303152d4c064ce332b26ac63 (diff)
downloadEssentials-d9ab62fe987e34fe49b8e8e4bdd3bd235bda7966.tar
Essentials-d9ab62fe987e34fe49b8e8e4bdd3bd235bda7966.tar.gz
Essentials-d9ab62fe987e34fe49b8e8e4bdd3bd235bda7966.tar.lz
Essentials-d9ab62fe987e34fe49b8e8e4bdd3bd235bda7966.tar.xz
Essentials-d9ab62fe987e34fe49b8e8e4bdd3bd235bda7966.zip
Add optional 2nd arg to broadcast format.
-rw-r--r--Essentials/src/com/earth2me/essentials/commands/Commandbroadcast.java14
-rw-r--r--Essentials/src/plugin.yml2
2 files changed, 14 insertions, 2 deletions
diff --git a/Essentials/src/com/earth2me/essentials/commands/Commandbroadcast.java b/Essentials/src/com/earth2me/essentials/commands/Commandbroadcast.java
index e6eeda28b..2b588d684 100644
--- a/Essentials/src/com/earth2me/essentials/commands/Commandbroadcast.java
+++ b/Essentials/src/com/earth2me/essentials/commands/Commandbroadcast.java
@@ -1,6 +1,7 @@
package com.earth2me.essentials.commands;
import static com.earth2me.essentials.I18n._;
+import com.earth2me.essentials.User;
import com.earth2me.essentials.Util;
import org.bukkit.Server;
import org.bukkit.command.CommandSender;
@@ -14,6 +15,17 @@ public class Commandbroadcast extends EssentialsCommand
}
@Override
+ public void run(final Server server, final User user, final String commandLabel, final String[] args) throws Exception
+ {
+ if (args.length < 1)
+ {
+ throw new NotEnoughArgumentsException();
+ }
+
+ ess.broadcastMessage(null, _("broadcast", Util.replaceFormat(getFinalArg(args, 0)), user.getDisplayName()));
+ }
+
+ @Override
public void run(final Server server, final CommandSender sender, final String commandLabel, final String[] args) throws Exception
{
if (args.length < 1)
@@ -21,6 +33,6 @@ public class Commandbroadcast extends EssentialsCommand
throw new NotEnoughArgumentsException();
}
- ess.broadcastMessage(null, _("broadcast", Util.replaceFormat(getFinalArg(args, 0))));
+ ess.broadcastMessage(null, _("broadcast", Util.replaceFormat(getFinalArg(args, 0)), sender.getName()));
}
}
diff --git a/Essentials/src/plugin.yml b/Essentials/src/plugin.yml
index 753c9a41e..f0aa663ba 100644
--- a/Essentials/src/plugin.yml
+++ b/Essentials/src/plugin.yml
@@ -50,7 +50,7 @@ commands:
broadcast:
description: Broadcasts a message to the entire server.
usage: /<command> <msg>
- aliases: [ebroadcast,bcast,ebcast]
+ aliases: [ebroadcast,shout,eshout,bc,ebc,bcast,ebcast]
bigtree:
description: Spawn a big tree where you are looking.
usage: /<command> <tree|redwood|jungle>