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
commit50dca9abf54d5a21d8e3fd79dfd7844d2d21f86c (patch)
treeb484cd0e5e519b63c5fc94a72605ff0b5048db4d
parentf1e3d482484c7f0468e072cf71b2e1961706a1ee (diff)
downloadEssentials-50dca9abf54d5a21d8e3fd79dfd7844d2d21f86c.tar
Essentials-50dca9abf54d5a21d8e3fd79dfd7844d2d21f86c.tar.gz
Essentials-50dca9abf54d5a21d8e3fd79dfd7844d2d21f86c.tar.lz
Essentials-50dca9abf54d5a21d8e3fd79dfd7844d2d21f86c.tar.xz
Essentials-50dca9abf54d5a21d8e3fd79dfd7844d2d21f86c.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>