The usage of the registered command now automatically adds itself
This commit is contained in:
parent
42d9248caf
commit
2ba071f2ea
@ -83,6 +83,7 @@ public class SimpleAutoResponder {
|
||||
public SimpleAutoResponder registerCommand(ResponderCommand... commands) {
|
||||
for (ResponderCommand command : commands) {
|
||||
if (command.getClass().isAnnotationPresent(CommandInfo.class)) {
|
||||
command.usage();
|
||||
this.commands.add(command);
|
||||
} else {
|
||||
LOG.error("Could not register command {}. You need to add the command information annotation.", command.getClass().getName());
|
||||
|
Reference in New Issue
Block a user