public class ScoreText extends BaseText implements ParsableText
Text.Serializer
StringVisitable.StyledVisitor<T>, StringVisitable.Visitor<T>
Modifier and Type | Field and Description |
---|---|
private String |
name |
private String |
objective |
private EntitySelector |
selector |
EMPTY, TERMINATE_VISIT
Modifier | Constructor and Description |
---|---|
private |
ScoreText(String name,
EntitySelector selector,
String objective) |
|
ScoreText(String name,
String objective) |
Modifier and Type | Method and Description |
---|---|
ScoreText |
copy()
Copies the text itself, excluding the styles or siblings.
|
boolean |
equals(Object obj) |
String |
getName() |
String |
getObjective() |
private String |
getPlayerName(ServerCommandSource source) |
private String |
getScore(String playerName,
ServerCommandSource source) |
MutableText |
parse(ServerCommandSource source,
Entity sender,
int depth) |
private static EntitySelector |
parseEntitySelector(String name) |
String |
toString() |
append, asOrderedText, asString, getSiblings, getStyle, hashCode, setStyle, shallowCopy
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
append, fillStyle, formatted, formatted, styled
asTruncatedString, getString, of, visit, visit, visitSelf, visitSelf
concat, concat, plain, styled
private final String name
@Nullable private final EntitySelector selector
private final String objective
private ScoreText(String name, @Nullable EntitySelector selector, String objective)
@Nullable private static EntitySelector parseEntitySelector(String name)
public String getName()
public String getObjective()
private String getPlayerName(ServerCommandSource source) throws com.mojang.brigadier.exceptions.CommandSyntaxException
com.mojang.brigadier.exceptions.CommandSyntaxException
private String getScore(String playerName, ServerCommandSource source)
public ScoreText copy()
Text
public MutableText parse(@Nullable ServerCommandSource source, @Nullable Entity sender, int depth) throws com.mojang.brigadier.exceptions.CommandSyntaxException
parse
in interface ParsableText
com.mojang.brigadier.exceptions.CommandSyntaxException