When executing rcon commands, the response is all in one string with no newline characters, even when the command yields several lines of text when executed on the console.
Bukkit returns the newlines, but vanilla Minecraft does not, making the server response much harder to parse.
Suggest either null-splitting or \n-splitting the lines.
Code analysis can be found by @unknown in this comment.
Comments 26
Is this still a concern in the current Minecraft version 1.7.2 / Launcher version 1.3.4 ? If so, please update the affected versions in order to best aid Mojang ensuring bugs are still valid in the latest releases/pre-releases.
Is this still a concern in the current Minecraft version 1.7.4 / Launcher version 1.3.8 or later? If so, please update the affected versions in order to best aid Mojang ensuring bugs are still valid in the latest releases/pre-releases.
Still a problem as of 1.15.2 on Windows 10
For example, when sending the command "op" with no accompanying username the following is returned
"Unknown commandop<–[HERE]"
When it should be
"Unknown command
op<--[HERE]"
This is very troublesome when executing commands that return a large number of lines, that are then not separated by line-breaks as they would be in game, or in the server console itself
This remains unfixed as of 1.15.2, but I asked the owner of the RCON newline fix mod if it could be updated for 1.15.2, and they just uploaded the 1.15.2 version (thanks!), so rcon is once again patched and working properly on my server.
It would be really nice to get this fixed at some point, though. I'm pretty sure it's just a one-line fix somewhere!
Can confirm on 1.18.2
Code analysis
Based on yarn 1.18.2 mappings
In the class RconCommandOutput
public void sendSystemMessage(Text message, UUID sender) {
this.buffer.append(message.getString());
}
The message is appended to the buffer. Without a line seperator. I suggest simply appending System.lineSeperator() to the buffer on each system message
public void sendSystemMessage(Text message, UUID sender) {
this.buffer.append(message.getString()).append(System.lineSeperator());
}
Like this!
Yes, this affects 1.5 as well. Exactly the same, no changes at all.