接口 TranslationProvider
public interface TranslationProvider
An object capable of being translated by the client in a
TranslatableComponent.-
方法概要
修饰符和类型方法说明default TranslatableComponentGet this translatable object as aTranslatableComponent.default TranslatableComponentasTranslatableComponent(Object... with) Get this translatable object as aTranslatableComponent.Get the translation key.
-
方法详细资料
-
getTranslationKey
String getTranslationKey()Get the translation key.- 返回:
- the translation key
-
asTranslatableComponent
Get this translatable object as aTranslatableComponent.- 返回:
- the translatable component
-
asTranslatableComponent
Get this translatable object as aTranslatableComponent.- 参数:
with- theStringsandBaseComponentsto use in the translation- 返回:
- the translatable component
-