Annotation Type Suggestions
This annotation allows you to create annotated methods that behave like suggestion providers.
The method parameters can be any combination of:
CommandContextCommandInputString, which receivesCommandInput.lastRemainingToken()- the command sender type
- any type that can be injected using
CommandContext.inject(Class)
The return type must be an Iterable or a Stream of String or Suggestion
or a future that completes with any of the supported return types.
Example signatures:
﹫Suggestions("name")
public List<String> methodName(CommandContext<YourSender> sender, CommandInput input)
﹫Suggestions("name")
public List<Suggestion> methodName(CommandContext<YourSender> sender, CommandInput input)
﹫Suggestions("name")
public Stream<Suggestion> methodName(CommandContext<YourSender> sender, String input)-
Required Element Summary
Required Elements
-
Element Details
-
value
Returns the name of the suggestion provider.This should be the same as the name specified in your command arguments.
- Returns:
- suggestion provider name
-