-
Notifications
You must be signed in to change notification settings - Fork 403
Open
Description
Hello, i use Brigadier API and i would make a thing like that :
List<RequiredArgumentBuilder> list;
for (var argument : list) {
builder.then(argument);
}
builder.execute(myCommand);
So, i have a list of arguments, and I would like my command to be executed only after all the arguments are saved. But I did not find how.
Even if there is an existing solution in the API, it would still be handy to create two new methods that would support collections. Something like this :
public T then(final ArgumentBuilder<S, ?>... arguments) {
if (target != null) {
throw new IllegalStateException("Cannot add children to a redirected node");
}
for (var argument : arguments) {
this.arguments.addChild(argument.build());
}
return getThis();
}
I have made a pull request here : #70
LeRoiDesKiwis, Emalios, MairwunNx and masmc05
Metadata
Metadata
Assignees
Labels
No labels