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.
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.
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 ourBukkitCommandActor
.Solution: We could create another interface that extends
LocaleReader
calledLocaleReaderTransmitter
, which would implement theLocaleReaderTransmitter#sendToActor(CommandActor)
method.Alternatives I've Considered: I've tried using
CommandExceptionAdapter
andBukkitExceptionAdapter
, but I'm not happy with that approach. That's becausereplyLocalized
orerrorLocalized
still utilize theLocaleReader
that only supports strings.