GeyserMC / Geyser

A bridge/proxy allowing you to connect to Minecraft: Java Edition servers with Minecraft: Bedrock Edition.
https://geysermc.org
MIT License
4.76k stars 687 forks source link

Text preprocess / postprocess API #5166

Open KabanFriends opened 4 days ago

KabanFriends commented 4 days ago

What feature do you want to see added?

I would like to see Geyser extensions being able to add their own preprocessor & postprocessor for MessageTranslator#convertMessage. A preprocessor would take the original component and output another component before the message conversion happens. A postprocessor would take the string converted by Geyser and output the processed string.

Examples of what this API would allow for extensions:

Are there any alternatives?

Right now there are no APIs that could achieve similar things.

Camotoy commented 6 hours ago

This is tough especially because we can't expose Adventure's API. Is there a way instead where you could integrate the Geyser/Floodgate API into a plugin to send an alternate message depending on the user, instead?