ToolSet / com.zndevs.toolset.commands.tools / SimpleCommand

SimpleCommand

class SimpleCommand : ToolSetCommand

Constructors

<init> SimpleCommand(commandName: String, commandRunner: SimpleCommandLambda)
SimpleCommand(commandName: String, commandRunner: SimpleCommandLambda, commandPermission: Permission)

Inherited Properties

enabled var enabled: Boolean

Functions

getCommandName fun getCommandName(): String
Gets the name of the command
getRequiredPermission fun getRequiredPermission(subCommand: String): Permission
Gets the permission required to run the specified subcommand
getSubCommands fun getSubCommands(): Array<SubCommand>
IMPORTANT: Do not recreate subcommands when this is run!
onCommand fun onCommand(sender: CommandSender, command: Command, label: String, args: Array<String>): Boolean
setConfigurationDefaults fun setConfigurationDefaults(defaults: ToolSetConfiguration): ToolSetConfiguration
Sets the default configuration values for this command

Inherited Functions

execute fun execute(sender: CommandSender, command: Command, label: String, args: Array<String>): Boolean
onTabComplete open fun onTabComplete(sender: CommandSender, command: Command, label: String, args: Array<String>): List<String>
run fun run(sender: CommandSender, command: Command, label: String, args: Array<String>): Boolean
Returns a command’s subcommands. Note: run last in your command executor!
setPlugin open fun setPlugin(plugin: JavaPlugin): Unit
Sets the plugin using this command.