Package net.okocraft.box.api.command
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 Component
getHelp
(@NotNull com.github.siroshun09.messages.minimessage.source.MiniMessageSource msgSrc) Gets the helps.@NotNull String
getName()
Gets the command name.@NotNull String
Gets the permission node.void
Executes the command.onTabComplete
(@NotNull org.bukkit.command.CommandSender sender, @NotNull String[] args) Gets the tab-completion.
-
Method Details
-
getName
Gets the command name.- Returns:
- the command name
-
getPermissionNode
Gets the permission node.- Returns:
- the permission node
-
getAliases
Gets the set of aliases.- Returns:
- the set of aliases
-
getHelp
@NotNull @NotNull Component getHelp(@NotNull @NotNull com.github.siroshun09.messages.minimessage.source.MiniMessageSource msgSrc) Gets the helps.- Parameters:
msgSrc
- aMiniMessageSource
- Returns:
- the helps
-
onCommand
void onCommand(@NotNull @NotNull org.bukkit.command.CommandSender sender, @NotNull @NotNull String[] args) 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 org.bukkit.command.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
-