Class PluginCommand
java.lang.Object
eu.hexagonmc.spigot.annotation.meta.PluginCommand
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidAdds an alias to this command.booleanstatic PluginCommandCreates command from an annotation.Gets the list of aliases for this command.Gets the description of this command.getName()Gets the name of this command.Gets the permission of this command.getUsage()Gets the usage of this command.inthashCode()booleanremoveAlias(String alias) Removes an alias from this command.voidsetDescription(String description) Sets the description of this command.voidSets the name of this command.voidsetPermission(String permission) Sets the permission of this command.voidSets the usage of this command.toString()
-
Constructor Details
-
PluginCommand
Creates a new command the given name.- Parameters:
name- The name of the command
-
-
Method Details
-
from
Creates command from an annotation. Parses the data stored in the annotation.- Parameters:
annotation- The annotation to parse for data- Returns:
- The new command
- See Also:
-
setName
Sets the name of this command.- Parameters:
name- The name to set
-
getName
Gets the name of this command.- Returns:
- The name
-
setDescription
Sets the description of this command.- Parameters:
description- The description to set
-
getDescription
Gets the description of this command.- Returns:
- The description
-
addAlias
Adds an alias to this command.- Parameters:
alias- The alias to add
-
removeAlias
Removes an alias from this command.- Parameters:
alias- The alias to remove- Returns:
- true if the command was removed false if it did not exist
-
getAliases
Gets the list of aliases for this command.- Returns:
- The list of aliases
-
setPermission
Sets the permission of this command.- Parameters:
permission- The permission to set
-
getPermission
Gets the permission of this command.- Returns:
- The permission
-
setUsage
Sets the usage of this command.- Parameters:
usage- The usage to set
-
getUsage
Gets the usage of this command.- Returns:
- The usage
-
toString
-
hashCode
public int hashCode() -
equals
-