public class TranslatableComponent extends BaseComponent
| Constructor and Description |
|---|
TranslatableComponent(String translate,
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(String text)
Adds a text substitution to the component.
|
BaseComponent |
duplicate()
Creates a duplicate of this TranslatableComponent.
|
void |
setWith(List<BaseComponent> components)
Sets the translation substitutions to be used in this component.
|
protected void |
toLegacyText(StringBuilder builder) |
protected void |
toPlainText(StringBuilder builder) |
addExtra, addExtra, getColor, getColorRaw, hasFormatting, isBold, isBoldRaw, isItalic, isItalicRaw, isObfuscated, isObfuscatedRaw, isStrikethrough, isStrikethroughRaw, isUnderlined, isUnderlinedRaw, setExtra, toLegacyText, toLegacyText, toPlainText, toPlainTextpublic TranslatableComponent(TranslatableComponent original)
original - the original for the new translatable component.public TranslatableComponent(String translate, 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(List<BaseComponent> components)
components - the components to substitutepublic void addWith(String text)
text - the text to substitutepublic void addWith(BaseComponent component)
component - the component to substituteprotected void toPlainText(StringBuilder builder)
protected void toLegacyText(StringBuilder builder)
Copyright © 2012-2017 SpigotMC. All Rights Reserved.