# ShopSubCommand (ShopChest 1.12 API)
Date: 2017-06-08

de.epiceric.shopchest.command

## Class ShopSubCommand

- java.lang.Object
- - de.epiceric.shopchest.command.ShopSubCommand

    public abstract class ShopSubCommand
    extends Object

### Constructor Summary

Constructors
Constructor and Description
`ShopSubCommand(String name, boolean playerCommand, org.bukkit.command.CommandExecutor executor, org.bukkit.command.TabCompleter tabCompleter)`

### Method Summary

All Methods Instance Methods Abstract Methods Concrete Methods
`boolean` `execute(org.bukkit.command.CommandSender sender, org.bukkit.command.Command command, String label, String[] args)` Execute the sub command
`abstract String` `getHelpMessage(org.bukkit.command.CommandSender sender)` Returns the help message for the command.
`String` `getName()`
`List<String>` `getTabCompletions(org.bukkit.command.CommandSender sender, org.bukkit.command.Command command, String label, String[] args)` Returns a list of tab completions for the sub command The main sub command will be tab completed by ShopChest
`boolean` `isPlayerCommand()` Returns whether the command can only be used by players, not by the console

### Methods inherited from class java.lang.Object

`clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

### Constructor Detail

#### ShopSubCommand

    public ShopSubCommand(String name,
                          boolean playerCommand,
                          org.bukkit.command.CommandExecutor executor,
                          org.bukkit.command.TabCompleter tabCompleter)

### Method Detail

#### getName

    public String getName()

#### isPlayerCommand

    public boolean isPlayerCommand()

Returns whether the command can only be used by players, not by the console

#### execute

    public boolean execute(org.bukkit.command.CommandSender sender,
                           org.bukkit.command.Command command,
                           String label,
                           String[] args)

Execute the sub command

Parameters:
  `sender` - Sender of the command
  `args` - Arguments of the command (`args[0]` is the sub command's name)
Returns:
  Whether the sender should be sent the help message

#### getTabCompletions

    public List<String> getTabCompletions(org.bukkit.command.CommandSender sender,
                                          org.bukkit.command.Command command,
                                          String label,
                                          String[] args)

Returns a list of tab completions for the sub command

The main sub command will be tab completed by ShopChest

Parameters:
  `sender` - Sender of the command
  `args` - Arguments of the command (`args[0]` is the sub command's name)
Returns:
  A list of tab completions (may be an empty list)

#### getHelpMessage

    public abstract String getHelpMessage(org.bukkit.command.CommandSender sender)

Returns the help message for the command.

Parameters:
  `sender` - Sender to receive the help message