@Arg
To define argument's parsing and suggestions, you need to use @Arg
annotation.
java
@Command(name = "say")
public class SayCommand {
@Execute
void execute(@Context SENDER sender, @Arg String text) {
System.out.println(text);
}
}
Types
If you want to automatically parse the argument to a specific type, then change the type of the argument to one of the supported types or create your own.
java
@Command(name = "time set")
public class TimeSetCommand {
@Execute
void execute(@Context SENDER sender, @Arg int time) {
sender.sendMessage("Time set to " + time);
}
}