T - Commandpublic abstract class ICommand<T> extends Object
| Modifier and Type | Field and Description |
|---|---|
protected List<SubCommand> |
subcommands |
| Constructor and Description |
|---|
ICommand(T plugin,
String command,
@Nullable Customization customization) |
| Modifier and Type | Method and Description |
|---|---|
void |
addSubcommand(SubCommand subCommand) |
Optional<SubCommand> |
findSubcommand(Class<? extends Annotation> annotation)
Find a subcommand annotated with something
|
String |
getCommand() |
Customization |
getCustomization() |
String |
getMessage() |
String |
getPermission() |
T |
getPlugin() |
List<SubCommand> |
getSubcommands() |
abstract void |
register(String command) |
protected final List<SubCommand> subcommands
public ICommand(T plugin, String command, @Nullable @Nullable Customization customization)
plugin - Owner of the commandcommand - Name of the command ( /name )customization - Optional Command customizationpublic abstract void register(String command)
public T getPlugin()
public void addSubcommand(SubCommand subCommand)
subCommand - SubCommand to addpublic Optional<SubCommand> findSubcommand(Class<? extends Annotation> annotation)
annotation - Annotation to findpublic String getPermission()
public Customization getCustomization()
public List<SubCommand> getSubcommands()
public String getMessage()
public String getCommand()