Bukkit/CraftBukkit — pull request #1254 by forairan (2013-10-14 22:08:04+00:00)
Title: [C] When a newline is present in a chat message, send it as seperate messages. Fixes BUKKIT-4469

**The Issue:**
Since Minecraft 1.6, the vanilla client will interpret a newline character (\n) as a printable character. If a chat message contains a newline character, the client will make a new line, but there will be a space in front of the new line.

**Justification for this PR:**
The above described client behavior is unexpected by most plugin authors; most plugin authors expect a newline character to create a new line without the extra space.

**PR Breakdown:**
This PR edits the sendRawMessage method in CraftPlayer to check if the message contains a new line. If the message does not contain a new line character, it is sent normally as one chat message. If the message does contain a new line character, the message is split by \n and sent as multiple messages.

**Testing Results and Materials:**
As expected, the client does not add a space in front of chat messages with a new line, as the chat messages are sent as seperate packets.
CraftBukkit -
Test case plugin -

**JIRA Ticket:**
BUKKIT-4469 -