|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectmondocommand.MondoCommand
public class MondoCommand
Handle commands dynamically with sub-command registration.
| Constructor Summary | |
|---|---|
MondoCommand()
Create a new MondoCommand with the base formatting specification. |
|
MondoCommand(FormatConfig formatter)
Create a new MondoCommand, used for dynamic sub command handling. |
|
| Method Summary | |
|---|---|
SubCommand |
addSub(String name)
Add a sub-command to this MondoCommand. |
SubCommand |
addSub(String name,
String permission)
Add a sub-command to this MondoCommand. |
void |
autoRegisterFrom(Object handler)
|
void |
handle(CallInfo call)
Implement the SubHandler interface so we can do sub-sub commands and such. |
List<SubCommand> |
listCommands()
|
boolean |
onCommand(org.bukkit.command.CommandSender sender,
org.bukkit.command.Command cmd,
String commandLabel,
String[] args)
Implement onCommand so this can be registered as a CommandExecutor |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public MondoCommand()
public MondoCommand(FormatConfig formatter)
formatter - Configuration on how to format responses.| Method Detail |
|---|
public boolean onCommand(org.bukkit.command.CommandSender sender,
org.bukkit.command.Command cmd,
String commandLabel,
String[] args)
onCommand in interface org.bukkit.command.CommandExecutor
public void handle(CallInfo call)
throws MondoFailure
handle in interface SubHandlercall - Contains all the information about the call.
MondoFailure - An optional error trap mechanism to display errors.
public SubCommand addSub(String name,
String permission)
name - The name of this sub-command.permission - The permission string of a permission to check for this command.
public SubCommand addSub(String name)
name - the name of this sub-command.
public void autoRegisterFrom(Object handler)
public List<SubCommand> listCommands()
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||