Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Codec ¶
type Codec interface { Marshaler Unmarshaler }
Codec can marshal and unmarshal to/from components to/from a different format.
type Json ¶
type Json struct { // Since Minecraft 1.16+ there can be hex colors (e.g. "#ff5555" instead of the named color "red"). // This setting decides whether to use the nearest legacy named color of the hex color instead. // // This setting is false by default to support older client versions. NoDownsampleColor bool // Since Minecraft 1.16+ hoverEvent "value" is deprecated in favour of "contents". // This setting decides whether the "value" key in a hoverEvent object shall be included // next to "contents" or not. // // It is false by default to support older client versions. NoLegacyHover bool // Whether to use Go's standard json library for marshalling. // It can be set to true if features such as key sorting in objects is needed // (e.g. when testing to compare output). // // It is false by default to use a MUCH MORE efficient (faster, less B/op & allocs/op needed) // third-party json marshaller instead. StdJson bool }
Json is a json serializer for Minecraft text components.
type Plain ¶
type Plain struct{}
Plain is a plain text component serializer. Plain does not support more complex features such as, but not limited to, colours, decorations, ClickEvent and HoverEvent.
type Unmarshaler ¶
Click to show internal directories.
Click to hide internal directories.