Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Feature] Custom message types in Locale/Translator #75

Closed
bivashy opened this issue Oct 18, 2023 · 2 comments
Closed

[Feature] Custom message types in Locale/Translator #75

bivashy opened this issue Oct 18, 2023 · 2 comments

Comments

@bivashy
Copy link
Contributor

bivashy commented Oct 18, 2023

Description:
I've always wanted to utilize the Locale feature to offer users multi-language messages. However, there's a primary issue: it doesn't support custom message types, such as Component. Due to this limitation, we cannot send clickable/hoverable messages to our BukkitCommandActor.

Solution:
We could create another interface that extends LocaleReader called LocaleReaderTransmitter, which would implement the LocaleReaderTransmitter#sendToActor(CommandActor) method.

Alternatives I've Considered:
I've tried using CommandExceptionAdapter and BukkitExceptionAdapter, but I'm not happy with that approach. That's because replyLocalized or errorLocalized still utilize the LocaleReader that only supports strings.

@Revxrsal
Copy link
Owner

Hmm, the implementation is indeed quite limited. Have you considered ResponseHandlers though? I'll see if I could scrape a simple API for getting that job done.

@Revxrsal
Copy link
Owner

Addressed in v4. Thanks.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants