/** * Build and register a command with this dispatcher using the * {@link ParametricBuilder} assigned on the root {@link CommandGraph}. * * @param object the object provided to the {@link ParametricBuilder} * @return this object * @see ParametricBuilder#registerMethodsAsCommands(com.sk89q.worldedit.util.command.Dispatcher, Object) */ public DispatcherNode registerMethods(Object object) { ParametricBuilder builder = graph.getBuilder(); if (builder == null) { throw new RuntimeException("No ParametricBuilder set"); } builder.registerMethodsAsCommands(getDispatcher(), object); return this; }