java.lang.Object
com.olziedev.playerauctions.api.auction.command.ACommand

public abstract class ACommand extends Object
Represents an auction sub-command that can be executed within the plugin.
  • Nested Class Summary

    Nested Classes
    Modifier and Type
    Class
    Description
    static enum 
    List of all possible executor types an auction command can have.
  • Field Summary

    Fields
    Modifier and Type
    Field
    Description
    The description of the command.
    This determines the allowed executor type for this command, if you wish for there to be no restriction, set it to null (default value).
    The name of the sub-command that the player will have to enter after the main command.
    boolean
    Should this command override any set sub-commands that have already been registered.
    The list of permissions for this command, a player will only need one of these and is not required to have all of them.
    The syntax of the command.
  • Constructor Summary

    Constructors
    Constructor
    Description
    The constructor of the command, this does not register the command, you will need to use CommandRegistry.addSubCommand(ACommand) to register the command.
  • Method Summary

    Modifier and Type
    Method
    Description
    abstract void
    execute(CommandSender sender, String[] arguments)
    This method is called when the command has been executed by its sender.
    onTabComplete(CommandSender sender, String[] arguments)
     

    Methods inherited from class java.lang.Object

    equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Field Details

    • name

      public String name
      The name of the sub-command that the player will have to enter after the main command.
    • description

      public String description
      The description of the command.
    • syntax

      public String syntax
      The syntax of the command.
    • permissions

      public String[] permissions
      The list of permissions for this command, a player will only need one of these and is not required to have all of them.
    • executorType

      public ACommand.ExecutorType executorType
      This determines the allowed executor type for this command, if you wish for there to be no restriction, set it to null (default value).
    • override

      public boolean override
      Should this command override any set sub-commands that have already been registered.
  • Constructor Details

    • ACommand

      public ACommand(String name)
      The constructor of the command, this does not register the command, you will need to use CommandRegistry.addSubCommand(ACommand) to register the command.
      Parameters:
      name - The name of the sub-command that the player will have to enter after the main command.
  • Method Details

    • execute

      public abstract void execute(CommandSender sender, String[] arguments)
      This method is called when the command has been executed by its sender.
      Parameters:
      sender - The sender who has sent the command.
      arguments - The arguments the sender has entered when executing the command.
    • onTabComplete

      public List<String> onTabComplete(CommandSender sender, String[] arguments)
      Parameters:
      sender - The sender who has sent the command.
      arguments - The arguments the sender has entered when executing the command.
      Returns:
      The list of options that the sender can use when executing the command.