Expand description
Builders for JSON text: each converts into a Text::Json,
so it can be passed wherever text is shown.
text::miniwrites Rift markup as{"mini": "...", "args": {...}}; Rift turns it into a component. Seedocs/text.mdfor the tags.text::legacywrites&ccodes as{"legacy": "...", "marker": "&"}.text::Componentbuilds a JSON text component field by field, with the 1.21.5 spellingsclick_eventandhover_event(Rift rewrites them for older clients).
Every builder converts into Text and into a
serde_json::Value for use inside other components, and implements
Display (its JSON text). A bare string is never
read as markup, so player input passed as an argument or as text cannot
add tags or click events.
Structs§
- Component
- A JSON text component, built field by field.
- Legacy
- Legacy codes; see
legacy. - Mini
- Markup with named arguments; see
mini.
Functions§
- legacy
- Legacy formatting codes with the
&marker, such as&cRed &lbold;&#rrggbbwrites a hex colour. UseLegacy::markerfor another marker. - mini
- Rift markup, such as
<gold>Hi <player>!. Add arguments withMini::argandMini::arg_component.