public class DispatcherNode extends Object
| Modifier and Type | Method and Description |
|---|---|
DispatcherNode |
describeAs(String description)
Set the description.
|
Dispatcher |
getDispatcher()
Get the underlying dispatcher of this object.
|
CommandGraph |
graph()
Get the root command graph.
|
DispatcherNode |
group(String... alias)
Create a new command that will contain sub-commands.
|
DispatcherNode |
parent()
Return the parent node.
|
void |
register(CommandCallable callable,
String... alias)
Register a command with this dispatcher.
|
DispatcherNode |
registerMethods(Object object)
Build and register a command with this dispatcher using the
ParametricBuilder assigned on the root CommandGraph. |
public DispatcherNode describeAs(String description)
This can only be used on DispatcherNodes returned by
group(String...).
description - the descriptionpublic void register(CommandCallable callable, String... alias)
callable - the executoralias - the list of aliases, where the first alias is the primary onepublic DispatcherNode registerMethods(Object object)
ParametricBuilder assigned on the root CommandGraph.object - the object provided to the ParametricBuilderParametricBuilder.registerMethodsAsCommands(com.sk89q.worldedit.util.command.Dispatcher, Object)public DispatcherNode group(String... alias)
The object returned by this method can be used to add sub-commands. To
return to this "parent" context, use graph().
alias - the list of aliases, where the first alias is the primary onepublic DispatcherNode parent()
RuntimeException - if there is no parent node.public CommandGraph graph()
public Dispatcher getDispatcher()
Copyright © 2010-2014. All Rights Reserved.