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 Stringnameprivate Stringobjectiveprivate EntitySelectorselectorFields inherited from interface net.minecraft.text.StringVisitable
EMPTY, TERMINATE_VISIT -
Constructor Summary
-
Method Summary
Modifier and Type Method Description ScoreTextcopy()Copies the text itself, excluding the styles or siblings.booleanequals(Object obj)StringgetName()StringgetObjective()private StringgetPlayerName(ServerCommandSource source)private StringgetScore(String playerName, ServerCommandSource source)MutableTextparse(ServerCommandSource source, Entity sender, int depth)private static EntitySelectorparseEntitySelector(String name)StringtoString()Methods inherited from class net.minecraft.text.BaseText
append, asOrderedText, asString, getSiblings, getStyle, hashCode, setStyle, shallowCopyMethods 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:TextCopies 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:
parsein interfaceParsableText- Throws:
com.mojang.brigadier.exceptions.CommandSyntaxException
-
equals
-
toString
-