Interface Command
- All Known Subinterfaces:
BoxAdminCommand, BoxCommand
- All Known Implementing Classes:
AbstractCommand
public interface Command
An interface of the command.
-
Method Summary
Modifier and TypeMethodDescriptionGets the set of aliases.@NotNull ComponentLikegetHelp()Gets the helps.@NotNull StringgetName()Gets the command name.@NotNull StringGets the permission node.voidonCommand(@NotNull CommandSender sender, @NotNull String[] args) Executes the command.onTabComplete(@NotNull CommandSender sender, @NotNull String[] args) Gets the tab-completion.
-
Method Details
-
getName
-
getPermissionNode
-
getAliases
-
getHelp
-
onCommand
Executes the command.When this method is called, the executor has the permission and the length of the argument array is greater than or equal to 1.
- Parameters:
sender- the executorargs- the array of arguments
-
onTabComplete
@NotNull @NotNull List<String> onTabComplete(@NotNull @NotNull CommandSender sender, @NotNull @NotNull String[] args) Gets the tab-completion.When this method is called, the executor has the permission and the length of the argument array is greater than or equal to 1.
- Parameters:
sender- the executorargs- the array of arguments- Returns:
- the result of the tab-completion or an empty list
-