Annotation Interface Subcommand
ContextProvider), and can also have a custom
permission. These subcommands can also be annotated with Completions to provide tab completions for the
subcommand. The subcommand method must be public, and must be in a class that is registered with the
CommandHandler.
Tab completions with the Completions annotation are only supported for subcommands. When registering
completions, you only need to define the completion arguments a single time. If there are other methods which
function as optional additional arguments for the subcommand, the previously registered arguments will still be
present when the user does their tab completion.
For example, if you have a subcommand method with the arguments (Player, String), and another method which
has the arguments (Player, String, String), the tab completions for the second method will still have the
Player and String arguments registered from the first method. You will only need to provide a
Completion for the additional 3rd argument.
Additionally, if the final argument is a String object, the BukkitDelegate will automatically append any additional
arguments to the end of the String. For example, if you have a subcommand method with the arguments
(Player, String), and the user executes the command with the arguments /command playerName arg2 arg3,
the String argument will be "arg2 arg3". This allows for us to use a String at the end of our
subcommand arguments to allow for the user to input a reason.
-
Required Element Summary
Required Elements -
Optional Element Summary
Optional Elements