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

Struct TextComponent

protocol/text/text.go:54–70  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

52}
53
54type TextComponent struct {
55 Type string `json:"type,omitempty" nbt:"type,omitempty"`
56 Extra []TextComponent `json:"extra,omitempty" nbt:"extra,omitempty"`
57
58 Color string `json:"color,omitempty" nbt:"color,omitempty"`
59 Bold bool `json:"bold,omitempty" nbt:"bold,omitempty"`
60 Italic bool `json:"italic,omitempty" nbt:"italic,omitempty"`
61 Underlined bool `json:"underlined,omitempty" nbt:"underlined,omitempty"`
62 Strikethrough bool `json:"strikethrough,omitempty" nbt:"strikethrough,omitempty"`
63 Obfuscated bool `json:"obfuscated,omitempty" nbt:"obfuscated,omitempty"`
64 Font string `json:"font,omitempty" nbt:"font,omitempty"`
65 Insertion string `json:"insertion,omitempty" nbt:"insertion,omitempty"`
66 ClickEvent ClickEvent `json:"click_event,omitempty" nbt:"click_event,omitempty"`
67 HoverEvent HoverEvent `json:"hover_event,omitempty" nbt:"hover_event,omitempty"`
68
69 Text string `json:"text" nbt:"text"`
70}
71
72func Sprint(a ...any) TextComponent {
73 return TextComponent{Text: fmt.Sprint(a...)}

Callers 1

EncodeMethod · 0.92

Calls

no outgoing calls

Tested by

no test coverage detected