summaryrefslogtreecommitdiffstats
path: root/Essentials/src/com/earth2me/essentials/commands/Commandmotd.java
diff options
context:
space:
mode:
Diffstat (limited to 'Essentials/src/com/earth2me/essentials/commands/Commandmotd.java')
-rw-r--r--Essentials/src/com/earth2me/essentials/commands/Commandmotd.java17
1 files changed, 10 insertions, 7 deletions
diff --git a/Essentials/src/com/earth2me/essentials/commands/Commandmotd.java b/Essentials/src/com/earth2me/essentials/commands/Commandmotd.java
index c695338f6..0031504e8 100644
--- a/Essentials/src/com/earth2me/essentials/commands/Commandmotd.java
+++ b/Essentials/src/com/earth2me/essentials/commands/Commandmotd.java
@@ -1,6 +1,9 @@
package com.earth2me.essentials.commands;
-import com.earth2me.essentials.Util;
+import com.earth2me.essentials.textreader.IText;
+import com.earth2me.essentials.textreader.KeywordReplacer;
+import com.earth2me.essentials.textreader.TextInput;
+import com.earth2me.essentials.textreader.TextPager;
import org.bukkit.Server;
import org.bukkit.command.CommandSender;
@@ -11,13 +14,13 @@ public class Commandmotd extends EssentialsCommand
{
super("motd");
}
-
+
@Override
- public void run(Server server, CommandSender sender, String commandLabel, String[] args) throws Exception
+ public void run(final Server server, final CommandSender sender, final String commandLabel, final String[] args) throws Exception
{
- for (String m : ess.getMotd(sender, Util.i18n("noMotd")))
- {
- sender.sendMessage(m);
- }
+ final IText input = new TextInput(sender, "motd", true, ess);
+ final IText output = new KeywordReplacer(input, sender, ess);
+ final TextPager pager = new TextPager(output);
+ pager.showPage(args.length > 0 ? args[0] : null, args.length > 1 ? args[1] : null, commandLabel, sender);
}
}