public class ScoreComponent extends TextComponent
TextComponent.ComponentConsumer| Constructor and Description |
|---|
ScoreComponent(java.lang.String name,
java.lang.String objective) |
ScoreComponent(java.lang.String name,
java.lang.String objective,
java.lang.String value) |
| Modifier and Type | Method and Description |
|---|---|
java.lang.String |
asSingleString() |
java.lang.String |
getName() |
java.lang.String |
getObjective() |
java.lang.String |
getValue() |
ScoreComponent |
setName(java.lang.String name)
Set the name of this component.
|
ScoreComponent |
setObjective(java.lang.String objective)
Set the objective of this component.
|
ScoreComponent |
setValue(java.lang.String value)
Set the value of this component.
|
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 ScoreComponent(java.lang.String name,
java.lang.String objective)
public ScoreComponent(java.lang.String name,
java.lang.String objective,
@Nullable
java.lang.String value)
public java.lang.String getName()
public ScoreComponent setName(java.lang.String name)
name - The namepublic java.lang.String getObjective()
public ScoreComponent setObjective(@Nullable java.lang.String objective)
objective - The objective@Nullable public java.lang.String getValue()
public ScoreComponent setValue(@Nullable java.lang.String value)
value - The new valuepublic java.lang.String asSingleString()
asSingleString in class TextComponentpublic TextComponent shallowCopy()
TextComponentshallowCopy in class TextComponentpublic java.lang.String toString()
toString in class TextComponent