Interface ConsoleCommandExtension

All Known Implementing Classes:
AbstractConsoleCommandExtension, ScriptEngineConsoleCommandExtension

@NonNullByDefault public interface ConsoleCommandExtension
Client which provide a console command have to implement this interface
Author:
Oliver Libutzki - Initial contribution
  • Method Details

    • getCommand

      String getCommand()
      Get the command of for the extension.
      Returns:
      command for the extension
    • getDescription

      String getDescription()
      Get the description for the extension.
      Returns:
      description for the extension
    • execute

      void execute(String[] args, Console console)
      This method called if a command for that extension is called. Clients are not allowed to throw exceptions. They have to write corresponding messages to the given Console
      Parameters:
      args - array which contains all the console command arguments
      console - the console used to print
    • getUsages

      List<String> getUsages()
      Returns:
      the help texts for this extension
    • getCompleter

      default @Nullable ConsoleCommandCompleter getCompleter()
      This method allows a ConsoleCommandExtension to provide an object to enable tab-completion functionality for the user.
      Returns:
      a ConsoleCommandCompleter object for this command