fix music list
it took me ages to figure this out that i need to just CLONE THE LIST
This commit is contained in:
parent
f1492a7a1b
commit
c057037154
1 changed files with 3 additions and 2 deletions
|
@ -255,8 +255,9 @@ public class MusicCommand implements Command {
|
||||||
|
|
||||||
int index = 0;
|
int index = 0;
|
||||||
|
|
||||||
while (index < fullList.size()) {
|
while (index <= fullList.size()) {
|
||||||
List<Component> list = fullList.subList(index, Math.min(index + eachSize, fullList.size()));
|
// we MUST make a new copy of the list else everything will fard..,.
|
||||||
|
List<Component> list = new ArrayList<>(fullList).subList(index, Math.min(index + eachSize, fullList.size()));
|
||||||
|
|
||||||
final Component component = Component.join(JoinConfiguration.separator(Component.space()), list);
|
final Component component = Component.join(JoinConfiguration.separator(Component.space()), list);
|
||||||
context.sendOutput(component);
|
context.sendOutput(component);
|
||||||
|
|
Loading…
Reference in a new issue