Package cloud.commandframework.internal
Interface CommandRegistrationHandler
-
- All Known Implementing Classes:
CommandRegistrationHandler.NullCommandRegistrationHandler
- Functional Interface:
- This is a functional interface and can therefore be used as the assignment target for a lambda expression or method reference.
@FunctionalInterface public interface CommandRegistrationHandler
Utility that registers commands natively for whatever platform the library is used in. This can do nothing, if the target platform does not have its own concept of commands
-
-
Nested Class Summary
Nested Classes Modifier and Type Interface Description static class
CommandRegistrationHandler.NullCommandRegistrationHandler
-
Method Summary
Modifier and Type Method Description static @NonNull CommandRegistrationHandler
nullCommandRegistrationHandler()
Create a newCommandRegistrationHandler
that does nothingboolean
registerCommand(@NonNull Command<?> command)
Attempt to register the command
-
-
-
Method Detail
-
nullCommandRegistrationHandler
static @NonNull CommandRegistrationHandler nullCommandRegistrationHandler()
Create a newCommandRegistrationHandler
that does nothing- Returns:
- Constructed registration
-
registerCommand
boolean registerCommand(@NonNull Command<?> command)
Attempt to register the command- Parameters:
command
- Command to register- Returns:
true
if the command was registered successfully, elsefalse
-
-