some minor fixes

/br sspl - says to click same spot again to apply, clicked same spot and nothing happens
/br layer - gives an error message "there was an error handling a FAWE command: [See console]
/br clipboard - doesn't let me execute because of max radius of 5, however am unable to set a lower radius as there is no option for it
/br butcher - tried to kill some mobs, but didn't work (nothing happened)
/br splatter - tried to execute the command, nothing happened
This commit is contained in:
Jesse Boyd
2019-04-11 05:14:58 +10:00
parent 21be61f03a
commit d61e5f33f1
6 changed files with 17 additions and 7 deletions

View File

@ -86,7 +86,7 @@ public class DispatcherNode {
* @see ParametricBuilder#registerMethodsAsCommands(com.sk89q.worldedit.util.command.Dispatcher, Object)
*/
public DispatcherNode registerMethods(Object object) {
return registerMethods(object, null);
return registerMethods(object, object instanceof CallableProcessor ? (CallableProcessor) object : null);
}
/**

View File

@ -194,6 +194,9 @@ public class ParametricBuilder {
else if (object instanceof CallableProcessor) {
callable = new ProcessedCallable(callable, (CallableProcessor) object);
}
if (object instanceof MethodCommands) {
((MethodCommands) object).register(method, callable, dispatcher);
}
dispatcher.registerCommand(callable, definition.aliases());
}
}