Add index based command builder element add

This commit is contained in:
crschnick 2024-05-13 15:18:25 +00:00
parent a2896aba76
commit 14268d2324

View file

@ -97,6 +97,13 @@ public class CommandBuilder {
return this;
}
public CommandBuilder add(int index, Element... s) {
for (var s1 : s) {
elements.add(index++, s1);
}
return this;
}
public CommandBuilder remove(String s) {
elements.removeIf(element -> element instanceof Fixed fixed && s.equals(fixed.string));
return this;