public final class CommandData extends Object
| Constructor and Description |
|---|
CommandData(CommandBase commandBase)
Constructor for the command data object
|
| Modifier and Type | Method and Description |
|---|---|
void |
addPermission(String permission)
Adds the permission nodes of the command
|
List<Integer> |
getArgValue()
Gets the arg values
|
CommandBase |
getCommandBase()
Gets the command base of the command for the invoke later
|
Method |
getCompletionMethod()
Gets the completion method
|
Map<Integer,String> |
getCompletions()
Gets all the completions and the ids
|
Class<?> |
getFirstParam()
Gets the first parameter class
|
Method |
getMethod()
Gets the method
|
String |
getName()
Gets the sub command name
|
List<String> |
getParameterNames()
Gets the parameter names
|
List<Class<?>> |
getParams()
Gets the list of parameters the method has
|
List<String> |
getPermissions()
Gets list of permissions
|
String |
getWrongUsage()
Gets the wrong usage message
|
boolean |
hasOptional()
Checks if the command has an optional argument
|
boolean |
hasPermissions()
Checks if the command has permissions or not
|
boolean |
isDefault()
Checks if the command is default or not
|
void |
setCompletionMethod(Method completionMethod)
Sets the completion method to run later
|
void |
setDefault(boolean defaultCmd)
Sets the command as default
|
void |
setFirstParam(Class<?> firstParam)
Sets the first parameter class
|
void |
setMethod(Method method)
Sets the method of the command
|
void |
setName(String name)
Sets the sub command name
|
void |
setOptional(boolean optional)
Sets if the command has an optional parameter or not
|
void |
setWrongUsage(String wrongUsage)
Sets the wrong usage message or id
|
public CommandData(CommandBase commandBase)
commandBase - The command base of the datapublic void setName(String name)
name - The name to setpublic void setMethod(Method method)
method - The methodpublic void setDefault(boolean defaultCmd)
defaultCmd - The value to setpublic void setFirstParam(Class<?> firstParam)
firstParam - The first parameterpublic void addPermission(String permission)
permission - the permission nodepublic void setOptional(boolean optional)
optional - The valuepublic void setWrongUsage(String wrongUsage)
wrongUsage - The wrong usage to setpublic void setCompletionMethod(Method completionMethod)
completionMethod - The completion methodpublic String getName()
public Method getMethod()
public Class<?> getFirstParam()
public List<Class<?>> getParams()
public Map<Integer,String> getCompletions()
public List<String> getPermissions()
public String getWrongUsage()
public List<String> getParameterNames()
public CommandBase getCommandBase()
public Method getCompletionMethod()
public boolean isDefault()
public boolean hasOptional()
public boolean hasPermissions()
Copyright © 2020. All rights reserved.