2011-03-19 22:39:51 +00:00
|
|
|
package com.earth2me.essentials.commands;
|
|
|
|
|
2013-10-16 19:59:39 +00:00
|
|
|
import com.earth2me.essentials.CommandSource;
|
2011-11-18 03:18:03 +00:00
|
|
|
import com.earth2me.essentials.textreader.KeywordReplacer;
|
|
|
|
import com.earth2me.essentials.textreader.TextInput;
|
|
|
|
import com.earth2me.essentials.textreader.TextPager;
|
2011-03-19 22:39:51 +00:00
|
|
|
import org.bukkit.Server;
|
|
|
|
|
|
|
|
|
2015-04-15 04:06:16 +00:00
|
|
|
public class Commandrules extends EssentialsCommand {
|
|
|
|
public Commandrules() {
|
|
|
|
super("rules");
|
|
|
|
}
|
2011-03-19 22:39:51 +00:00
|
|
|
|
2015-04-15 04:06:16 +00:00
|
|
|
@Override
|
|
|
|
public void run(final Server server, final CommandSource sender, final String commandLabel, final String[] args) throws Exception {
|
|
|
|
if (sender.isPlayer()) {
|
|
|
|
ess.getUser(sender.getPlayer()).setDisplayNick();
|
|
|
|
}
|
|
|
|
|
2020-08-11 18:09:22 +00:00
|
|
|
final TextPager pager = new TextPager(new KeywordReplacer(new TextInput(sender, "rules", true, ess), sender, ess));
|
2015-04-15 04:06:16 +00:00
|
|
|
pager.showPage(args.length > 0 ? args[0] : null, args.length > 1 ? args[1] : null, commandLabel, sender);
|
|
|
|
}
|
2011-03-19 22:39:51 +00:00
|
|
|
}
|