public final class ScoreComponent extends BaseComponent
Constructor and Description |
---|
ScoreComponent(ScoreComponent original)
Creates a score component from the original to clone it.
|
ScoreComponent(String name,
String objective)
Creates a new score component with the specified name and objective.
If not specifically set, value will default to an empty string; signifying that the scoreboard value should take precedence. |
Modifier and Type | Method and Description |
---|---|
ScoreComponent |
duplicate()
Clones the BaseComponent and returns the clone.
|
protected void |
toLegacyText(StringBuilder builder) |
protected void |
toPlainText(StringBuilder builder) |
addExtra, addExtra, copyFormatting, copyFormatting, copyFormatting, duplicateWithoutFormatting, getColor, getColorRaw, getFont, getFontRaw, hasFormatting, isBold, isBoldRaw, isItalic, isItalicRaw, isObfuscated, isObfuscatedRaw, isStrikethrough, isStrikethroughRaw, isUnderlined, isUnderlinedRaw, retain, setExtra, toLegacyText, toLegacyText, toPlainText, toPlainText
public ScoreComponent(String name, String objective)
value
will override any value found in the
scoreboard.name
- the name of the entity, or an entity selector, whose score
should be displayedobjective
- the internal name of the objective the entity's score is
attached topublic ScoreComponent(ScoreComponent original)
original
- the original for the new score componentpublic ScoreComponent duplicate()
BaseComponent
duplicate
in class BaseComponent
protected void toPlainText(StringBuilder builder)
protected void toLegacyText(StringBuilder builder)
Copyright © 2012–2020 SpigotMC. All rights reserved.