public abstract class Command extends Object implements CommandExecutor, Nameable
| Modifier and Type | Field and Description |
|---|---|
protected String[] |
aliases |
private Collection<CommandArgument> |
commandArguments |
protected String |
description |
protected String |
name |
protected String |
permission |
| Modifier | Constructor and Description |
|---|---|
protected |
Command(String name,
String permission,
String... aliases)
Constructs a new command with a name, a needed permission and variable aliases.
|
| Modifier and Type | Method and Description |
|---|---|
protected <T extends Command> |
appendArgument(CommandArgument commandArgument)
Appends a new argument to this command
|
String[] |
getAliases() |
Collection<CommandArgument> |
getCommandArguments() |
String |
getDescription() |
String |
getName() |
String |
getPermission() |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitonExecuteCommandprotected String name
protected String permission
protected String[] aliases
protected String description
private Collection<CommandArgument> commandArguments
protected <T extends Command> T appendArgument(CommandArgument commandArgument)
T - a subclass of CommandcommandArgument - the argument to appendpublic Collection<CommandArgument> getCommandArguments()
public String getDescription()
public String getPermission()
public String[] getAliases()
Copyright © 2020. All rights reserved.