Package frontend.alphaspawn.tools.command

Examples of frontend.alphaspawn.tools.command.CommandManager


   * Registers basics command that every bot should have like
   * !help, etc.
   */
  protected void registerBotCommands () {
    // Get the command manager
    CommandManager cmdMgr = CommandManager.getInstance();

    // Register the !help command
    this.objHelpCmd = new Help( this.objConnection );
    cmdMgr.registerCommand( "!help", this.objHelpCmd );
  }
View Full Code Here


    }
    else {
      // The player wants to obtain a list of all available commands
      // Retrieve the command manager
      // TODO Print a beautiful help gui
      CommandManager cmdMgr = CommandManager.getInstance();
     
      // Variables use to display the menu
      SortedMap cmdDisplay = new TreeMap();
      int longestCmd = 0;
     
      // Retrieve a list of all commands
      List cmdList = cmdMgr.getCommands();

      // Display list of commands
      for ( Iterator iter = cmdList.iterator() ; iter.hasNext() ; ) {
        Command cmd = (Command)iter.next();
View Full Code Here

  /**
   * Registers the command used by this plugin.
   */
  protected void registerCommand () {
    // Get the command manager
    CommandManager cmdMgr = CommandManager.getInstance();
   
    // Check if the plugin command can be registered
    if ( this.objLagCmd == null &&
       this.objConnection != null &&
       this.objServerCommands != null ) {   
      // Register the "lag" command
      this.objLagCmd = new Lag( this.objConnection, this.objServerCommands );
      cmdMgr.registerCommand( "!lag", this.objLagCmd );
    }
  }
View Full Code Here

  /**
   * Removes the command used by this plugin.
   */
  protected void removeCommand () {
    // Get the command manager
    CommandManager cmdMgr = CommandManager.getInstance();
   
    // Check if the lag command can be remove
    if ( this.objLagCmd != null ) {
      // Remove the "lag" command
      cmdMgr.removeCommand( "!lag", this.objLagCmd );
      this.objLagCmd = null;
    }
  }
View Full Code Here

  /**
   * Registers the command used by this plugin.
   */
  protected void registerCommand () {
    // Get the command manager
    CommandManager cmdMgr = CommandManager.getInstance();
   
    // Check if the plugin command can be registered
    if ( this.objPluginCmd == null &&
       this.objConnection != null &&
       this.objBotOperators != null ) {   
      // Register the "plugin" command
      this.objPluginCmd = new Plugin( this.objConnection, this.objPluginManager, this.objBotOperators );
      cmdMgr.registerCommand( "!plugin", this.objPluginCmd );
    }
  }
View Full Code Here

  /**
   * Removes the command used by this plugin.
   */
  protected void removeCommand () {
    // Get the command manager
    CommandManager cmdMgr = CommandManager.getInstance();
   
    // Check if the plugin command can be remove
    if ( this.objPluginCmd != null ) {
      // Remove the "plugin" command
      cmdMgr.removeCommand( "!plugin", this.objPluginCmd );
      this.objPluginCmd = null;
    }
  }
View Full Code Here

TOP

Related Classes of frontend.alphaspawn.tools.command.CommandManager

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.