mirror of
https://github.com/xpipe-io/xpipe.git
synced 2024-11-22 07:30:24 +00:00
Add index based command builder element add
This commit is contained in:
parent
a2896aba76
commit
14268d2324
1 changed files with 7 additions and 0 deletions
|
@ -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;
|
||||
|
|
Loading…
Reference in a new issue