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 Summary
Modifier and TypeMethodDescriptionvoidThis method called if acommandfor that extension is called.Get the command of for the extension.default @Nullable ConsoleCommandCompleterThis method allows aConsoleCommandExtensionto provide an object to enable tab-completion functionality for the user.Get the description for the extension.
-
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
This method called if acommandfor that extension is called. Clients are not allowed to throw exceptions. They have to write corresponding messages to the givenConsole- Parameters:
args- array which contains all the console command argumentsconsole- the console used to print
-
getUsages
- Returns:
- the help texts for this extension
-
getCompleter
This method allows aConsoleCommandExtensionto provide an object to enable tab-completion functionality for the user.- Returns:
- a
ConsoleCommandCompleterobject for this command
-