public class CommandHandler
extends java.lang.Object
Modifier and Type | Field and Description |
---|---|
static java.util.regex.Pattern |
ARGUMENT_PATTERN |
Constructor and Description |
---|
CommandHandler() |
Modifier and Type | Method and Description |
---|---|
java.util.Set<Command> |
getCommands()
Get commands this command handler can process
|
void |
handle(User user,
java.lang.String message,
java.lang.String handler) |
protected boolean |
process(User user,
Command command)
Handle any extra processing the default method doesn't provide in sub classes.
|
protected boolean |
run(User user,
Command command) |
void |
setCommands(java.util.Set<Command> commands)
Set this commandhandler's commands.
|
public void handle(User user, java.lang.String message, java.lang.String handler)
protected boolean process(User user, Command command)
user
- Usercommand
- Commandpublic void setCommands(java.util.Set<Command> commands)
commands
- Commands to setpublic java.util.Set<Command> getCommands()