public interface Command extends Terminable
EMPTY| Modifier and Type | Method and Description |
|---|---|
void |
call(CommandContext<?> context)
Calls the command handler
|
void |
register(ExtendedJavaPlugin plugin,
String... aliases)
Registers this command with the server, via the given plugin instance
|
default void |
registerAndBind(TerminableConsumer consumer,
ExtendedJavaPlugin plugin,
String... aliases)
Registers this command with the server, via the given plugin instance, and then binds it with the composite terminable.
|
bindWith, close, hasTerminated, of, terminatevoid register(@Nonnull ExtendedJavaPlugin plugin, @Nonnull String... aliases)
plugin - the plugin instancealiases - the aliases for the commanddefault void registerAndBind(@Nonnull TerminableConsumer consumer, @Nonnull ExtendedJavaPlugin plugin, @Nonnull String... aliases)
consumer - the terminable consumer to bind withplugin - the plugin instancealiases - the aliases for the commandvoid call(@Nonnull CommandContext<?> context) throws CommandInterruptException
context - the contexts for the commandCommandInterruptExceptionCopyright © 2017. All rights reserved.