diff options
author | KHobbits <rob@khobbits.co.uk> | 2013-04-30 02:24:30 +0100 |
---|---|---|
committer | KHobbits <rob@khobbits.co.uk> | 2013-04-30 02:24:30 +0100 |
commit | 9ba922363239e3a2580a0f68decd57d0f790fdd9 (patch) | |
tree | 941a7f287fac34c4cc40dbd5345a188c38833704 | |
parent | c4173c04869b5031e5de40d1d46a7520c62df6ac (diff) | |
download | Essentials-9ba922363239e3a2580a0f68decd57d0f790fdd9.tar Essentials-9ba922363239e3a2580a0f68decd57d0f790fdd9.tar.gz Essentials-9ba922363239e3a2580a0f68decd57d0f790fdd9.tar.lz Essentials-9ba922363239e3a2580a0f68decd57d0f790fdd9.tar.xz Essentials-9ba922363239e3a2580a0f68decd57d0f790fdd9.zip |
Support /me in console
-rw-r--r-- | Essentials/src/com/earth2me/essentials/commands/Commandme.java | 15 |
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)); + } } |