Class Command

java.lang.Object
net.ME1312.Galaxi.Command.Command
All Implemented Interfaces:
CommandHandler

public abstract class Command extends Object implements CommandHandler
Command Layout Class
  • Constructor Details

    • Command

      public Command(PluginInfo plugin)
      Creates a new Command
      Parameters:
      plugin - Plugin
  • Method Details

    • create

      public static Command create(PluginInfo plugin, CommandHandler executor)
      Creates a new Command (by wrapping an existing executor)
      Parameters:
      plugin - Plugin
      executor - Executor
    • autocomplete

      public CompletionHandler autocomplete()
      Gets the AutoComplete handler for this Command
      Returns:
      AutoComplete Handler
    • autocomplete

      public Command autocomplete(CompletionHandler value)
      Sets an AutoComplete handler for this Command
      Parameters:
      value - AutoComplete Handler
      Returns:
      The Command
    • plugin

      public PluginInfo plugin()
      Gets the Plugin that registering this Command
      Returns:
      Plugin Info
    • description

      public String description()
      Gets the Description of this Command
      Returns:
      Command Description
    • description

      public Command description(String value)
      Set the Description of this Command
      Parameters:
      value - Value
      Returns:
      The Command
    • help

      public String[] help()
      Get the Help Page for this Command
      Returns:
      Help Page
    • help

      public Command help(String... lines)
      Set the Help Page for this Command
      Parameters:
      lines - Help Page Lines
      Returns:
      The Command
    • usage

      public String[] usage()
      Get the Usage of this Command
      Returns:
      Command Usage
    • usage

      public Command usage(String... args)
      Set the Usage of this Command
      Parameters:
      args - Argument Placeholders
      Returns:
      The Command
    • register

      public void register(String... handles)
      Register this Command
      Parameters:
      handles - Aliases