@Override
public void perform()
{
if (this.commandChain.size() == 0) return;
MCommand parentCommand = this.commandChain.get(this.commandChain.size()-1);
ArrayList<String> lines = new ArrayList<String>();
for (String helpline : parentCommand.getHelp())
{
lines.add(Txt.parse("<a>#<i> "+helpline));
}
for(MCommand subCommand : parentCommand.getSubCommands())
{
if (subCommand.visibleTo(sender))
{
lines.add(subCommand.getUseageTemplate(this.commandChain, true, true, sender));
}
}
Integer pagenumber = this.arg(0, ARInteger.get(), 1);
if (pagenumber == null) return;
sendMessage(Txt.getPage(lines, pagenumber, "Help for command \""+parentCommand.getAliases().get(0)+"\"", sender));
}