Interface TextTranslator
- All Known Subinterfaces:
CommonTranslationData,CommonTranslationData.RecordBased,TextTranslator.LocaleBased
- All Known Implementing Classes:
CommandTranslationData,CommonTranslationData.Impl,DialogHolder
- Functional Interface:
- This is a functional interface and can therefore be used as the assignment target for a lambda expression or method reference.
Converts a Java
Component to a Bedrock legacy-formatted String.
Implementations usually do this using the methods available in MessageTranslator, possibly using a player's locale.
This interface essentially curries the player's locale (and as such, in many cases, the GeyserSession)
outside of the convertMessage method, leading to a simpler signature.
It is planned to expand the usage of this interface in the future, reducing the need to pass a GeyserSession around.
-
Nested Class Summary
Nested Classes -
Method Summary
Modifier and TypeMethodDescriptionconvertText(net.kyori.adventure.text.Component component) static TextTranslator
-
Method Details
-
convertText
-
forLocale
-