public abstract class SubCommand
extends java.lang.Object
| Constructor and Description |
|---|
SubCommand(java.lang.String name,
java.lang.String usage,
java.lang.String description,
java.lang.String permission,
boolean playerOnly,
int length,
java.lang.String... aliases)
The constructor for a subcommand.
|
| Modifier and Type | Method and Description |
|---|---|
abstract void |
execute(org.bukkit.command.CommandSender sender,
java.lang.String label,
java.lang.String[] args) |
java.lang.String[] |
getAliases()
The aliases of this subcommand.
|
java.lang.String |
getDescription()
The description of this subcommand.
|
int |
getLength()
The length of this subcommand.
|
java.lang.String |
getName()
The name of this subcommand.
|
java.lang.String |
getPermission()
The permission of this subcommand.
|
java.lang.String |
getUsage()
The usage of this subcommand.
|
boolean |
isPlayerOnly()
Whether or not this subcommand can only be used by a player.
|
public SubCommand(@NotNull
java.lang.String name,
@Nullable
java.lang.String usage,
@Nullable
java.lang.String description,
@Nullable
java.lang.String permission,
boolean playerOnly,
int length,
java.lang.String... aliases)
name - Name of this subcommand. Should not be null!usage - Usage of this subcommand. May be null.description - Description of this subcommand. May be null.permission - Permission of this subcommand. May be null.playerOnly - Whether or not this subcommand should be player only.length - Length of this subcommand. Must be greater than or equal to 1.aliases - Aliases of this subcommand.public java.lang.String getName()
String that is the name of this subcommand.public java.lang.String getUsage()
public java.lang.String getDescription()
public java.lang.String getPermission()
public boolean isPlayerOnly()
public int getLength()
public java.lang.String[] getAliases()
public abstract void execute(org.bukkit.command.CommandSender sender,
java.lang.String label,
java.lang.String[] args)