Interface Command

All Known Implementing Classes:
AbstractCommand, BaseCommandExecutor, CompositeCommand, DocumentCommand, LanguageCommand

public interface Command
An abstraction for supporting nesting of commands. This is a light-weight version of the BukkitCommand abstraction.
  • Method Details

    • getName

      String getName()
      Returns the name of the sub-command.
    • getPermission

      String getPermission()
      The permission of the command. Can be null.
    • getDescription

      String getDescription()
      A short description of the sub-command. Used when listing the commands with others.
    • getUsage

      String getUsage()
      A more verbatim description of the command. Used when /command help is executed.
    • getParams

      String[] getParams()
      The list of parameters accepted by the command. Can be empty, not null.
    • getAliases

      String[] getAliases()
      Returns aliases for the command. Can be empty, cannot be null.
    • execute

      boolean execute(org.bukkit.command.CommandSender sender, String alias, Map<String,​Object> data, String... args)
      Executes the command.
    • getTabCompleter

      org.bukkit.command.TabCompleter getTabCompleter()
      Optional TabCompleter to override the default ones. Can be null
    • getParent

      CompositeCommand getParent()
      Returns the parent command (if one such is available). May return null.
    • setParent

      void setParent(CompositeCommand parent)
      Assigns a parent command.
      Parameters:
      parent -
    • accept

      void accept(CommandVisitor visitor)
      Visitor pattern.
      Parameters:
      visitor - A visitor for this node.
    • getFeaturePermissions

      Map<String,​String> getFeaturePermissions()
      Returns a map of feature-toggling permissions supporte by this command.
      Returns:
      A map of permission-node as key, and description as value.
    • hasPermission

      boolean hasPermission(org.bukkit.command.CommandSender sender, String permission)
      Allows for other than permission checking
      Parameters:
      sender - The commandSender requesting permission
      permission - The permission
      Returns:
      true if the sender can execute this command