public static class Text.Placeholder extends Text
Text
placeholder that can be replaced with another
Text by Texts.format(Text, Map)
.TextBuilder.Placeholder
Text.Literal, Text.Placeholder, Text.Score, Text.Selector, Text.Translatable
Modifier and Type | Field and Description |
---|---|
protected String |
key |
children, childrenIterable, clickAction, format, hoverAction, shiftClickAction
Modifier and Type | Method and Description |
---|---|
TextBuilder.Placeholder |
builder()
Returns a new
TextBuilder with the content, formatting and
actions of this text. |
boolean |
equals(Object o) |
Optional<Text> |
getFallback()
Get the fallback text that will be used in place if this placeholder has no value.
|
String |
getKey()
Returns the placeholder key used to replace this placeholder with the
real content.
|
int |
hashCode() |
String |
toString() |
getChildren, getClickAction, getColor, getFormat, getHoverAction, getShiftClickAction, getStyle, toText, withChildren
protected final String key
public final String getKey()
public Optional<Text> getFallback()
public TextBuilder.Placeholder builder()
Text
TextBuilder
with the content, formatting and
actions of this text. This can be used to edit an otherwise immutable
Text
instance.