split

private open fun split(command: String): List<String>

One command per line (like .mcfunction): skip blanks + '#' comments, strip a leading '/' — sendCommand wants the bare command, exactly as the chat screen passes it (string.substring(1)).