public final class TranslatableComponent extends BaseComponent
| Constructor and Description |
|---|
TranslatableComponent(java.lang.String translate,
java.lang.Object... with)
Creates a translatable component with the passed substitutions
|
TranslatableComponent(TranslatableComponent original)
Creates a translatable component from the original to clone it.
|
| Modifier and Type | Method and Description |
|---|---|
void |
addWith(BaseComponent component)
Adds a component substitution to the component.
|
void |
addWith(java.lang.String text)
Adds a text substitution to the component.
|
BaseComponent |
duplicate()
Creates a duplicate of this TranslatableComponent.
|
void |
setWith(java.util.List<BaseComponent> components)
Sets the translation substitutions to be used in this component.
|
protected void |
toLegacyText(java.lang.StringBuilder builder) |
protected void |
toPlainText(java.lang.StringBuilder builder) |
addExtra, addExtra, copyFormatting, copyFormatting, copyFormatting, duplicateWithoutFormatting, getColor, getColorRaw, hasFormatting, isBold, isBoldRaw, isItalic, isItalicRaw, isObfuscated, isObfuscatedRaw, isStrikethrough, isStrikethroughRaw, isUnderlined, isUnderlinedRaw, retain, setExtra, toLegacyText, toLegacyText, toPlainText, toPlainTextpublic TranslatableComponent(TranslatableComponent original)
original - the original for the new translatable component.public TranslatableComponent(java.lang.String translate,
java.lang.Object... with)
translate - the translation keywith - the Strings and
BaseComponents to use into the
translationtranslate,
setWith(java.util.List)public BaseComponent duplicate()
duplicate in class BaseComponentpublic void setWith(java.util.List<BaseComponent> components)
components - the components to substitutepublic void addWith(java.lang.String text)
text - the text to substitutepublic void addWith(BaseComponent component)
component - the component to substituteprotected void toPlainText(java.lang.StringBuilder builder)
protected void toLegacyText(java.lang.StringBuilder builder)
Copyright © 2015-2018 WaterfallMC. All Rights Reserved.