newSimpleCommand()
.name("addlist")
.description("Adds an element to the collection")
.argument(argument)
.executor(args -> {
int size = this.size();
for (int i = 0; i < size; i++) {
IValue<E> arg = args.get(i);
if (this.add(arg.getValue())) {
args.inform("Added \"%s\" to the collection.", arg.getStringValue());
} else {
args.warn("Could not add \"%s\" to the collection (possible duplicate?).", arg.getStringValue());
}
}
})
.build();
command : xray blocks addlist iron_ore coal_ore gold_ore
BaseSimpleSettingCollection.java
Is there a way to add a list?