Interface Command

All Known Subinterfaces:
BoxAdminCommand, BoxCommand
All Known Implementing Classes:
AbstractCommand

public interface Command
An interface of the command.
  • Method Summary

    Modifier and Type
    Method
    Description
    @NotNull @Unmodifiable Set<String>
    Gets the set of aliases.
    @NotNull Component
    getHelp(@NotNull com.github.siroshun09.messages.minimessage.source.MiniMessageSource msgSrc)
    Gets the helps.
    @NotNull String
    Gets the command name.
    @NotNull String
    Gets the permission node.
    void
    onCommand(@NotNull org.bukkit.command.CommandSender sender, @NotNull String[] args)
    Executes the command.
    @NotNull List<String>
    onTabComplete(@NotNull org.bukkit.command.CommandSender sender, @NotNull String[] args)
    Gets the tab-completion.
  • Method Details

    • getName

      @NotNull @NotNull String getName()
      Gets the command name.
      Returns:
      the command name
    • getPermissionNode

      @NotNull @NotNull String getPermissionNode()
      Gets the permission node.
      Returns:
      the permission node
    • getAliases

      @NotNull @NotNull @Unmodifiable Set<String> 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 - a MiniMessageSource
      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 executor
      args - 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 executor
      args - the array of arguments
      Returns:
      the result of the tab-completion or an empty list