Why migrate
Mojang and paper are phasing out legacy text formatting codes and text composition APIs (Bungee chat, Bukkit ChatColor, etc), in favor of Adventure API.
TerraPlusMinus uses legacy inline formatting codes and deprecated APIs in many places. We should aim to proactively migrate to Adventure API before those legacy interfaces are definitively removed.
The migration should be quite straightforward and mostly transparent to end users, except maybe for the prefix plugin configuration option.
Proposed approach for the prefix configuration option:
- migrate
prefix over to Adventure's legacy serializer
- add a
chatPrefix option taking a serialized text component, and fall back to it when prefix is unset
- log a warning when the plugin is loaded to encourage users to migrate from
prefix to chatPrefix
Useful resources:
Why migrate
Mojang and paper are phasing out legacy text formatting codes and text composition APIs (Bungee chat, Bukkit
ChatColor, etc), in favor of Adventure API.TerraPlusMinus uses legacy inline formatting codes and deprecated APIs in many places. We should aim to proactively migrate to Adventure API before those legacy interfaces are definitively removed.
The migration should be quite straightforward and mostly transparent to end users, except maybe for the
prefixplugin configuration option.Proposed approach for the
prefixconfiguration option:prefixover to Adventure's legacy serializerchatPrefixoption taking a serialized text component, and fall back to it whenprefixis unsetprefixtochatPrefixUseful resources: