|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectmondocommand.SubCommand
public final class SubCommand
Represents a sub-command which can be generated by method chaining.
| Constructor Summary | |
|---|---|
SubCommand(String name,
String permission)
Create a new SubCommand. |
|
| Method Summary | |
|---|---|
SubCommand |
allowConsole()
Allow this command to be used on the console. |
boolean |
checkPermission(org.bukkit.command.CommandSender sender)
Check if a Player/CommandSender has the requisite permission for this command. |
String |
getDescription()
Get the command's description. |
SubHandler |
getHandler()
Get the currently set SubHandler. |
int |
getMinArgs()
Check what the minimum number of args is |
String |
getName()
Get the command's name. |
String |
getPermission()
Get the permission node this command is required to use. |
String |
getUsage()
Get the usage string. |
boolean |
isConsoleAllowed()
If true, console access is allowed. |
SubCommand |
setDescription(String description)
Set the command's description. |
SubCommand |
setHandler(SubHandler handler)
Set the SubHandler. |
SubCommand |
setMinArgs(int minArgs)
Set the minimum number of arguments this command accepts. |
SubCommand |
setUsage(String usage)
Set this command's usage string. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public SubCommand(String name,
String permission)
name - The text of this subcommand.permission - The permission to check for this command. If null, don't use permissions.| Method Detail |
|---|
public SubCommand allowConsole()
public boolean isConsoleAllowed()
public int getMinArgs()
public SubCommand setMinArgs(int minArgs)
minArgs - The minimum number of args
public SubHandler getHandler()
public SubCommand setHandler(SubHandler handler)
handler - A SubHandler which is called when this command executes.
public String getName()
public String getUsage()
public SubCommand setUsage(String usage)
usage - a usage string.
public String getDescription()
public SubCommand setDescription(String description)
description - Description text.
public String getPermission()
public boolean checkPermission(org.bukkit.command.CommandSender sender)
sender - a ConsoleSender or Player.
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||