Every time when a player leaves the server it outputs the message to the log with the whole TextComponent object rather than just its Text-property, for example:[19:23:55] [Server thread/INFO]: Notch lost connection: TextComponent{text='Disconnected', siblings=[], style=Style{hasParent=false, color=null, bold=null, italic=null, underlined=null, obfuscated=null, clickEvent=null, hoverEvent=null, insertion=null}}
This makes the log harder to read afterwards. It's only a minor annoyance though.
I'd rather expect:[19:23:55] [Server thread/INFO]: Notch lost connection: Disconnected
Code analysis by @unknown can be found in this comment.
Comments 10
It's just obvious that it's not intended...
What's the additional benefit to knowing the text "Disconnected" should not be underlined, italic, bold, have no color etc.?
With the introduction of more advanced text formatting and translation this changed to the pretty unreadable format, which I imagine is because it was forgotten to change the disconnect reason from a simple string object to the property of the TextComponent object. Before the change one could easily read the server's output on the commandline. Now it takes up 3 lines and one needs to search for the actual information.
It's just an oversight, and I want to help by making it aware.
Is this still a concern in the current Minecraft version? If so, please update the affected versions in order to best aid Mojang ensuring bugs are still valid in the latest releases/pre-releases. If this has been done, we can reopen the issue.
Keep in mind that the "Resolved"-Status on this ticket just means "Answered", and that we are waiting for further information on whether this issue still exists or not. We will reopen it as soon as the requested information has been delivered.
Please link to this comment in the description
The following is based on decompiled version of Minecraft 1.9 using MCP 9.24 beta.
The reason why this happens is because the method net.minecraft.network.NetHandlerPlayServer.onDisconnect(ITextComponent)
is printing the ITextComponent
object instead of calling its net.minecraft.util.text.ITextComponent.getUnformattedText()
, which is correctly done for example by the net.minecraft.server.network.NetHandlerLoginServer.onDisconnect(ITextComponent)
method.
How is this a bug? Its just gives more information about the message. You should have left a suggestion to make it better instead of reporting as a bug just because it looks bad.