Skip to content

Migrate to Adventure API #54

@SmylerMC

Description

@SmylerMC

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:

  1. migrate prefix over to Adventure's legacy serializer
  2. add a chatPrefix option taking a serialized text component, and fall back to it when prefix is unset
  3. log a warning when the plugin is loaded to encourage users to migrate from prefix to chatPrefix

Useful resources:

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions