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
|
Method |
getMethod()
Gets the method
|
String |
getName()
Gets the sub command name
|
String |
getNoPermission()
Gets the no permission message
|
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
|
Class<?> |
getSenderClass()
Gets the first parameter class
|
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 |
setMethod(Method method)
Sets the method of the command
|
void |
setName(String name)
Sets the sub command name
|
void |
setNoPermission(String noPermission)
Sets the no permission message or id
|
void |
setOptional(boolean optional)
Sets if the command has an optional parameter or not
|
void |
setSenderClass(Class<?> senderClass)
Sets the first parameter class
|
void |
setWrongUsage(String wrongUsage)
Sets the wrong usage message or id
|
public CommandData(CommandBase commandBase)
commandBase - The command base of the datapublic void addPermission(String permission)
permission - the permission nodepublic void setOptional(boolean optional)
optional - The valuepublic String getName()
public void setName(String name)
name - The name to setpublic Method getMethod()
public void setMethod(Method method)
method - The methodpublic Class<?> getSenderClass()
public void setSenderClass(Class<?> senderClass)
senderClass - The first parameterpublic List<Class<?>> getParams()
public Map<Integer,String> getCompletions()
public List<String> getPermissions()
public String getWrongUsage()
public void setWrongUsage(String wrongUsage)
wrongUsage - The wrong usage to setpublic String getNoPermission()
public void setNoPermission(String noPermission)
noPermission - The no permission to setpublic List<String> getParameterNames()
public CommandBase getCommandBase()
public Method getCompletionMethod()
public void setCompletionMethod(Method completionMethod)
completionMethod - The completion methodpublic boolean isDefault()
public void setDefault(boolean defaultCmd)
defaultCmd - The value to setpublic boolean hasOptional()
public boolean hasPermissions()
Copyright © 2020. All rights reserved.