summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorKHobbits <rob@khobbits.co.uk>2013-04-30 02:24:30 +0100
committerKHobbits <rob@khobbits.co.uk>2013-04-30 02:24:30 +0100
commit9a3dad918faa861c3cf15e0cb2c2951f38cf2e30 (patch)
treece460c94cb8f75de622a7c828236a487bdafe085
parent2093f1b6617239533a9b4222469292936346ffe5 (diff)
downloadEssentials-9a3dad918faa861c3cf15e0cb2c2951f38cf2e30.tar
Essentials-9a3dad918faa861c3cf15e0cb2c2951f38cf2e30.tar.gz
Essentials-9a3dad918faa861c3cf15e0cb2c2951f38cf2e30.tar.lz
Essentials-9a3dad918faa861c3cf15e0cb2c2951f38cf2e30.tar.xz
Essentials-9a3dad918faa861c3cf15e0cb2c2951f38cf2e30.zip
Support /me in console
-rw-r--r--Essentials/src/com/earth2me/essentials/commands/Commandme.java15
1 files changed, 15 insertions, 0 deletions
diff --git a/Essentials/src/com/earth2me/essentials/commands/Commandme.java b/Essentials/src/com/earth2me/essentials/commands/Commandme.java
index 4322592d4..6120caaf2 100644
--- a/Essentials/src/com/earth2me/essentials/commands/Commandme.java
+++ b/Essentials/src/com/earth2me/essentials/commands/Commandme.java
@@ -4,6 +4,7 @@ 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;
public class Commandme extends EssentialsCommand
@@ -32,4 +33,18 @@ public class Commandme extends EssentialsCommand
user.setDisplayNick();
ess.broadcastMessage(user, _("action", user.getDisplayName(), message));
}
+
+ @Override
+ public void run(Server server, CommandSender sender, String commandLabel, String[] args) throws Exception
+ {
+ if (args.length < 1)
+ {
+ throw new NotEnoughArgumentsException();
+ }
+
+ String message = getFinalArg(args, 0);
+ message = Util.replaceFormat(message);
+
+ ess.getServer().broadcastMessage(_("action", "@", message));
+ }
}