public class KeybindComponent extends TextComponent
TextComponent.ComponentConsumer| Constructor and Description |
|---|
KeybindComponent(java.lang.String keybind) |
KeybindComponent(java.lang.String keybind,
Translator translator) |
| Modifier and Type | Method and Description |
|---|---|
java.lang.String |
asSingleString() |
java.lang.String |
getKeybind() |
KeybindComponent |
setKeybind(java.lang.String keybind)
Set the keybind of this component.
|
KeybindComponent |
setTranslator(Translator translator)
Set the translator function used to translate the key.
|
TextComponent |
shallowCopy()
Create a shallow copy of this component.
This will only copy the component itself (including style) and not its siblings. |
java.lang.String |
toString() |
append, append, append, append, asLegacyFormatString, asSingleString, asUnformattedString, asUnformattedString, atlasSprite, atlasSprite, atlasSprite, atlasSprite, blockNbt, blockNbt, copy, copyMetaTo, empty, entityNbt, entityNbt, forEach, formatted, getSiblings, getStyle, keybind, mergeSiblingParentStyle, of, of, of, of, score, score, selector, selector, setParentStyle, setSiblingParentStyle, setStyle, storageNbt, storageNbt, styled, translation, translation, visitpublic KeybindComponent(java.lang.String keybind)
public KeybindComponent(java.lang.String keybind,
@Nonnull
Translator translator)
public java.lang.String getKeybind()
public KeybindComponent setKeybind(java.lang.String keybind)
keybind - The keybindpublic KeybindComponent setTranslator(@Nullable Translator translator)
translator - The translator functionpublic java.lang.String asSingleString()
asSingleString in class TextComponentpublic TextComponent shallowCopy()
TextComponentshallowCopy in class TextComponentpublic java.lang.String toString()
toString in class TextComponent