Package com.massivecraft.mcore.cmd

Examples of com.massivecraft.mcore.cmd.MCommand


 
  @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));
  }
View Full Code Here

TOP

Related Classes of com.massivecraft.mcore.cmd.MCommand

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.