public class ScoreText extends BaseText implements ParsableText
Text.SerializerStringVisitable.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, shallowCopyclone, finalize, getClass, notify, notifyAll, wait, wait, waitappend, fillStyle, formatted, formatted, styledasTruncatedString, getString, of, visit, visit, visitSelf, visitSelfconcat, concat, plain, styledprivate 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.CommandSyntaxExceptionprivate String getScore(String playerName, ServerCommandSource source)
public ScoreText copy()
Textpublic MutableText parse(@Nullable ServerCommandSource source, @Nullable Entity sender, int depth) throws com.mojang.brigadier.exceptions.CommandSyntaxException
parse in interface ParsableTextcom.mojang.brigadier.exceptions.CommandSyntaxException