The Adventure docs are currently a work in progress. Some areas may have limited coverage or may not be entirely up to date. Feel free to join our discord at https://discord.gg/MMfhJ8F if you have any questions.
The legacy text serializer converts text to and from the traditional chat format used in Minecraft prior to Minecraft 1.7, and continues to be used to this day for its familiarity to server owners.
The legacy text serializer does not support most advanced features, including hover and click events, components besides text components, and insertions. RGB colors are supported (see more in the RGB support section) and URLs can be transformed into clickable components if explicitly requested (note, however, that click events containing a URL will not be serialized). If advanced features are desired, consider using MiniMessage.
The legacy text serializer is accessed using the
LegacyComponentSerializer. The default
pre-provided serializers include one that uses the section symbol (§) (for display in
old clients) and another that uses an ampersand (&) typically used in configuration and
commands to specify color codes.
The default configuration for the legacy text serializer will deserialize all three of the RGB formats supported by Adventure but will only serialize legacy Mojang colors (downsampling to the nearest color as needed) and does not transform URLs in text to links. You can configure an instance to automatically add click events to URLs in components and allow the serializer to serialize RGB colors in either the Adventure RGB format or the BungeeCord RGB format using the builder.
The legacy serializer supports deserializing three different formats:
Legacy Mojang color and formatting codes (such as
An Adventure-specific RGB format that is intended to be easy to edit (such as
A BungeeCord RGB color code format that is backwards compatible with older deserialization routines but is difficult to manipulate and makes it the user’s responsibility to assign a fallback for non-RGB clients (such as
The legacy serializer downsamples RGB colors by default, but you can create a serializer that serializes RGB colors in either the Adventure or BungeeCord RGB formats using the builder.