KyoriPowered / adventure

A user-interface library, formerly known as text, for Minecraft: Java Edition
https://docs.advntr.dev/
MIT License
679 stars 105 forks source link

Create a MiniMessage Translator utility implementation #971

Open kezz opened 9 months ago

kezz commented 9 months ago

It's a fairly common thing to want to use the GlobalTranslator to render MiniMessage strings. We should provide a utility class that can create a simple Translator implementation that renders TranslatableComponent instances using MiniMessage.

This class should provide a standard TagResolver for resolving positional arguments, but also perhaps a utility method for creating VirtualComponent instances that hold a name and component, to be used for standard named tags.