| 213 | } |
| 214 | |
| 215 | func componentStyles(component TextComponent, text *string, codeChar rune) { |
| 216 | *text += colorChar(component.Color, string(codeChar)) |
| 217 | if component.Obfuscated { |
| 218 | *text += string(codeChar) + "k" |
| 219 | } |
| 220 | if component.Obfuscated { |
| 221 | *text += string(codeChar) + "k" |
| 222 | } |
| 223 | if component.Bold { |
| 224 | *text += string(codeChar) + "l" |
| 225 | } |
| 226 | if component.Strikethrough { |
| 227 | *text += string(codeChar) + "m" |
| 228 | } |
| 229 | if component.Underlined { |
| 230 | *text += string(codeChar) + "n" |
| 231 | } |
| 232 | if component.Italic { |
| 233 | *text += string(codeChar) + "o" |
| 234 | } |
| 235 | } |