public interface CommandService<TCommandExecutor,TCommandSource>
| Modifier and Type | Method and Description |
|---|---|
TCommandExecutor |
generateHelpCommand(CommandNode<TCommandSource> node)
Generates a help command for the provided
CommandNode. |
TCommandExecutor |
generateReloadCommand() |
default TCommandExecutor |
generateRootCommand(java.lang.String helpUsage) |
TCommandExecutor |
generateRootCommand(java.lang.String helpUsage,
java.util.function.Predicate<TCommandSource> extended) |
TCommandExecutor |
generateRoutingCommand(TCommandExecutor root,
java.util.Map<java.util.List<java.lang.String>,TCommandExecutor> children,
boolean childCommandFallback)
Generates a command that runs a child command if its alias
matches the first argument of the generated command.
|
default TCommandExecutor |
generateVersionCommand(java.lang.String helpUsage) |
TCommandExecutor |
generateVersionCommand(java.lang.String helpUsage,
java.util.function.Predicate<TCommandSource> extended) |
TCommandExecutor generateRoutingCommand(@Nullable TCommandExecutor root, java.util.Map<java.util.List<java.lang.String>,TCommandExecutor> children, boolean childCommandFallback)
If childCommandFallback is false
and the first argument does not match a child, a syntax error message will
be shown to the source. Otherwise, the root command executor will run.
root - The command to run if no child was specified.children - A map of child commands and their aliases.childCommandFallback - whether to fall back to the root command if the first
argument did not match a child command aliasjava.lang.UnsupportedOperationException - on Sponge.
Use CommandSpec instead.TCommandExecutor generateRootCommand(java.lang.String helpUsage, java.util.function.Predicate<TCommandSource> extended)
default TCommandExecutor generateRootCommand(java.lang.String helpUsage)
TCommandExecutor generateVersionCommand(java.lang.String helpUsage, java.util.function.Predicate<TCommandSource> extended)
default TCommandExecutor generateVersionCommand(java.lang.String helpUsage)
TCommandExecutor generateHelpCommand(CommandNode<TCommandSource> node)
CommandNode.node - The command node to return the HelpCommand forCommandNodeTCommandExecutor generateReloadCommand()