Skip to content

LegacyTextComponent

LegacyTextComponent = string | {[key: string]: unknown; } | LegacyTextComponent[]

Text component before 1.21.5, written as JSON: plain text, an object, or a list of them. Fields aren’t checked; see the text component format for your version ({text: "hi", color: "gold", clickEvent: {action: "run_command", value: "/say hi"}}). To write JSON yourself, pass nbt.raw('{"text":"hi"}').