public class KeybindText extends BaseText
Text.SerializerStringVisitable.StyledVisitor<T>, StringVisitable.Visitor<T>| Modifier and Type | Field and Description |
|---|---|
private String |
key |
private Supplier<Text> |
translated |
private static Function<String,Supplier<Text>> |
translator |
EMPTY, TERMINATE_VISIT| Constructor and Description |
|---|
KeybindText(String key) |
| Modifier and Type | Method and Description |
|---|---|
KeybindText |
copy()
Copies the text itself, excluding the styles or siblings.
|
boolean |
equals(Object obj) |
String |
getKey() |
private Text |
getTranslated() |
static void |
setTranslator(Function<String,Supplier<Text>> translator) |
String |
toString() |
<T> Optional<T> |
visitSelf(StringVisitable.StyledVisitor<T> visitor,
Style style)
Visits the text itself.
|
<T> Optional<T> |
visitSelf(StringVisitable.Visitor<T> visitor)
Visits the text itself.
|
append, asOrderedText, asString, getSiblings, getStyle, hashCode, setStyle, shallowCopyclone, finalize, getClass, notify, notifyAll, wait, wait, waitappend, fillStyle, formatted, formatted, styledasTruncatedString, getString, of, visit, visitconcat, concat, plain, styledprivate final String key
public KeybindText(String key)
@Environment(value=CLIENT) public static void setTranslator(Function<String,Supplier<Text>> translator)
private Text getTranslated()
public <T> Optional<T> visitSelf(StringVisitable.Visitor<T> visitor)
visitor - the visitorStringVisitable.visit(Visitor)@Environment(value=CLIENT) public <T> Optional<T> visitSelf(StringVisitable.StyledVisitor<T> visitor, Style style)
visitor - the visitorstyle - the current styleStringVisitable.visit(StyledVisitor, Style)public KeybindText copy()
Textpublic String getKey()