Text Formatting
Text formatting codes are used to create fancy colorized text, they are prefixed with a grave symbol `
.
After using a formatting code such as `o
(italic), it has to be reset, otherwise it will continue until the end of the text.
info
Some older maps may use the deprecated ยง
section symbol to specify formatting codes.
This symbol should be avoided in favor of the `
grave symbol wherever possible for all new maps.
Examplesโ
<item name="`iFrozen `rWater" material="snowball"/>
<line>This is one of three of `9Blue Team`r's victory monuments.</line>
<item name="`1Blue `4Red `rNone" material="book"/>
Chat Colorsโ
ID | Color Name |
---|---|
0 | BLACK |
1 | DARK_BLUE |
2 | DARK_GREEN |
3 | DARK_AQUA |
4 | DARK_RED |
5 | DARK_PURPLE |
6 | GOLD |
7 | GRAY |
8 | DARK_GRAY |
9 | BLUE |
a | GREEN |
b | AQUA |
c | RED |
d | LIGHT_PURPLE |
e | YELLOW |
f | WHITE |
Text Stylesโ
ID | Function |
---|---|
k | MAGIC |
l | BOLD |
m | STRIKETHROUGH |
n | UNDERLINE |
o | ITALIC |
r | RESET |
The magic formatter will convert all the text after it into a scrambled, constantly changing mess of letters.
note
Reset (`r
) will clear all previous color and text styles after a specified length in a text line.
To have a line all italic and one word red you will have to to do the following.
<!-- Everything is italic and the word "italic" is also red -->
<line>`oThis is an `citalic `r`otext with a single red word.</line>
Copied from: bukkit docs - Chat Color