public abstract class SubCommand extends Object
Constructor and Description |
---|
SubCommand(String name,
Permissions permission,
String usage,
CommandType commandType,
String arguments)
Class constructor, called with super(...) in subcommands.
|
Modifier and Type | Method and Description |
---|---|
String |
getArguments()
Used to get a string format of required arguments.
|
CommandType |
getCommandType()
Used to get the command type.
|
String |
getFirstName()
Used to get the first alias.
|
String |
getName()
Used to get all aliases.
|
Permissions |
getPermission()
Used to get the permission required by the command.
|
String |
getUsage()
Used to get the info about usage of the command.
|
abstract boolean |
onCommand(org.bukkit.command.CommandSender sender,
org.bukkit.command.Command cmd,
String commandLabel,
String[] args)
The Command Execution method.
|
public SubCommand(String name, Permissions permission, String usage, CommandType commandType, String arguments)
name
- Name(s) (aliases) of the commandpermission
- Required permissionusage
- Usage informationcommandType
- Type Enumarguments
- Additional possible arguments the command requirespublic String getArguments()
public String getFirstName()
public String getName()
public Permissions getPermission()
public String getUsage()
public CommandType getCommandType()
public abstract boolean onCommand(org.bukkit.command.CommandSender sender, org.bukkit.command.Command cmd, String commandLabel, String[] args)
sender
- Parameter of onCommand in CommandExecutor.cmd
- Parameter of onCommand in CommandExecutor.commandLabel
- Parameter of onCommand in CommandExecutor.args
- Parameter of onCommand in CommandExecutor.CommandExecutor
Copyright © 2017. All rights reserved.