Displaying multiple texts on the same line

As by title i want to display many texts on the same line. Now, this is not hard to do it if you know how many texts you’ll have to print, but if you don’t know (and this is my case) i’m having troubles making it works.
Basically i want to print a list of names but i don’t know the size of this list, so i will dynamically append names. I’ve tried using an ArrayList of Text and pass that to the chat message but i get this

While instead i want something like
name1, name2, name3,… and a different color for every one of these
So what should i do to make it works like this?

EDIT: usign the .toArray() method make it works :smiley:

What’s wrong with MessageReceiver#sendMessages(Iterable<Text>)?

I didn’t know that exists ahahahah