Annotation Type Suggestions


@Target(METHOD) @Retention(RUNTIME) public @interface Suggestions
This annotation allows you to create annotated methods that behave like suggestion providers.

The method parameters can be any combination of:

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
    Modifier and Type
    Required Element
    Description
    Returns the name of the suggestion provider.
  • 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