Interface ConsoleCommandExtension

All Known Implementing Classes:
AbstractConsoleCommandExtension, ScriptEngineConsoleCommandExtension

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

    • getCommand

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

      String getDescription()
      Get the description for the extension.
      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
      args - array which contains all the console command arguments
      console - the console used to print
    • getUsages

      List<String> getUsages()
      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.
      a ConsoleCommandCompleter object for this command