Difference between revisions of "Chat"
(→Colors: Copied the table from minecraftwiki.net's Classic Server Protocol page and updated values.)
Revision as of 12:19, 6 January 2011
Chat strings are subject to myriad limitations imposed by defects in the Notchian server and client, and also have special meanings for certain characters.
The following list of characters is known to be supported by the Notchian server:
Characters not in this list will cause Notchian servers to kick clients, and Notchian clients to choke and die horribly.
The Notchian client has support for colorized text. To select a color, a color escape code, similar to an ANSI color escape code, is inserted to change the color of the following characters.
|Sample||Code||Common Name||Foreground Color||Background Color|
These correspond very roughly to the colors available in ANSI terminals.
A color escape code is created by combining the control character § (U+00A7) with the character specifying the color; thus, "§4" selects dark red as the color for the following text.
The Notchian client expects that a color escape code in a chat message will be followed by at least one character, and will otherwise crash with a StringIndexOutOfBoundsException. The workaround for servers is to never end a message with a color control character.