Package net.minecraft.text
Class ScoreText
java.lang.Object
net.minecraft.text.BaseText
net.minecraft.text.ScoreText
- All Implemented Interfaces:
com.mojang.brigadier.Message
,MutableText
,ParsableText
,StringVisitable
,Text
public class ScoreText extends BaseText implements ParsableText
-
Nested Class Summary
Nested classes/interfaces inherited from interface net.minecraft.text.StringVisitable
StringVisitable.StyledVisitor<T>, StringVisitable.Visitor<T>
Nested classes/interfaces inherited from interface net.minecraft.text.Text
Text.Serializer
-
Field Summary
Fields Modifier and Type Field Description private String
name
private String
objective
private EntitySelector
selector
Fields inherited from interface net.minecraft.text.StringVisitable
EMPTY, TERMINATE_VISIT
-
Constructor Summary
-
Method Summary
Modifier and Type Method 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()
Methods inherited from class net.minecraft.text.BaseText
append, asOrderedText, asString, getSiblings, getStyle, hashCode, setStyle, shallowCopy
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
-
Field Details
-
name
-
selector
-
objective
-
-
Constructor Details
-
ScoreText
-
ScoreText
-
-
Method Details
-
parseEntitySelector
-
getName
-
getObjective
-
getPlayerName
private String getPlayerName(ServerCommandSource source) throws com.mojang.brigadier.exceptions.CommandSyntaxException- Throws:
com.mojang.brigadier.exceptions.CommandSyntaxException
-
getScore
-
copy
Description copied from interface:Text
Copies the text itself, excluding the styles or siblings. -
parse
public MutableText parse(@Nullable ServerCommandSource source, @Nullable Entity sender, int depth) throws com.mojang.brigadier.exceptions.CommandSyntaxException- Specified by:
parse
in interfaceParsableText
- Throws:
com.mojang.brigadier.exceptions.CommandSyntaxException
-
equals
-
toString
-