Examples of MCommand


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

Examples of org.eclipse.e4.ui.model.application.commands.MCommand

    List<Theme> themes = themeManager.getAvailableThemes();
    if (themes.size() > 0) {
      MApplication application = getApplication();

      MCommand switchThemeCommand = null;
      for (MCommand cmd : application.getCommands()) {
        if ("contacts.switchTheme".equals(cmd.getElementId())) { //$NON-NLS-1$
          switchThemeCommand = cmd;
          break;
        }
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. 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.