Skip to content

Text preprocess / postprocess API #5166

Open
@KabanFriends

Description

@KabanFriends

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:

  • Add custom handler for translatable components
  • Replace keybind components with bedrock's translation key to show the key icons
  • Replace certain unicode characters in a message with another to allow server pack to display them as emojis (This is especially helpful in Japanese language where the client's available characters are extremely limited)

Are there any alternatives?

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

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions