public class KeybindComponent extends TextComponent
| 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() |
TextComponent |
copy() |
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 and not its siblings. |
java.lang.String |
toString() |
append, append, append, append, asLegacyFormatString, asUnformattedString, atlasSprite, atlasSprite, blockNbt, blockNbt, 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, translationpublic 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 copy()
copy in interface net.lenni0451.mcstructs.core.Copyable<TextComponent>copy in class TextComponentpublic TextComponent shallowCopy()
TextComponentshallowCopy in class TextComponentpublic java.lang.String toString()
toString in class TextComponent