MCPcopy Create free account
hub / github.com/ZeppelinMC/Zeppelin / componentStyles

Function componentStyles

protocol/text/text.go:215–235  ·  view source on GitHub ↗
(component TextComponent, text *string, codeChar rune)

Source from the content-addressed store, hash-verified

213}
214
215func 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}

Callers 1

MarshalFunction · 0.85

Calls 1

colorCharFunction · 0.85

Tested by

no test coverage detected