Package net.minecraft.server.commands
Class ScoreboardCommand
java.lang.Object
net.minecraft.server.commands.ScoreboardCommand
-
Nested Class Summary
Nested Classes -
Field Summary
FieldsModifier and TypeFieldDescriptionprivate static final com.mojang.brigadier.exceptions.SimpleCommandExceptionType
private static final com.mojang.brigadier.exceptions.SimpleCommandExceptionType
private static final com.mojang.brigadier.exceptions.Dynamic2CommandExceptionType
private static final com.mojang.brigadier.exceptions.SimpleCommandExceptionType
private static final com.mojang.brigadier.exceptions.SimpleCommandExceptionType
private static final com.mojang.brigadier.exceptions.SimpleCommandExceptionType
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprivate static com.mojang.brigadier.builder.ArgumentBuilder
<CommandSourceStack, ?> addNumberFormats
(CommandBuildContext p_323655_, com.mojang.brigadier.builder.ArgumentBuilder<CommandSourceStack, ?> p_313757_, ScoreboardCommand.NumberFormatCommandExecutor p_313912_) private static int
addObjective
(CommandSourceStack pSource, String pName, ObjectiveCriteria pCriteria, Component pDisplayName) private static int
addScore
(CommandSourceStack pSource, Collection<ScoreHolder> pTargets, Objective pObjective, int pAmount) private static int
clearDisplaySlot
(CommandSourceStack pSource, DisplaySlot pSlot) private static com.mojang.brigadier.builder.LiteralArgumentBuilder
<CommandSourceStack> private static int
enableTrigger
(CommandSourceStack pSource, Collection<ScoreHolder> pTargets, Objective pObjective) private static Component
getFirstTargetName
(Collection<ScoreHolder> pScores) private static int
getScore
(CommandSourceStack pSource, ScoreHolder pScoreHolder, Objective pObjective) private static int
listObjectives
(CommandSourceStack pSource) private static int
listTrackedPlayers
(CommandSourceStack pSource) private static int
listTrackedPlayerScores
(CommandSourceStack pSource, ScoreHolder pScore) private static int
performOperation
(CommandSourceStack pSource, Collection<ScoreHolder> pTargets, Objective pTargetObjectives, OperationArgument.Operation pOperation, Collection<ScoreHolder> pSourceEntities, Objective pSourceObjective) static void
register
(com.mojang.brigadier.CommandDispatcher<CommandSourceStack> p_138469_, CommandBuildContext p_324608_) private static int
removeObjective
(CommandSourceStack pSource, Objective pObjective) private static int
removeScore
(CommandSourceStack pSource, Collection<ScoreHolder> pTargets, Objective pObjective, int pAmount) private static int
resetScore
(CommandSourceStack pSource, Collection<ScoreHolder> pTargets, Objective pObjective) private static int
resetScores
(CommandSourceStack pSource, Collection<ScoreHolder> pTargets) private static int
setDisplayAutoUpdate
(CommandSourceStack pSource, Objective pObjective, boolean pDisplayAutoUpdate) private static int
setDisplayName
(CommandSourceStack pSource, Objective pObjective, Component pDisplayName) private static int
setDisplaySlot
(CommandSourceStack pSource, DisplaySlot pSlot, Objective pObjective) private static int
setObjectiveFormat
(CommandSourceStack pSource, Objective pObjective, NumberFormat pFormat) private static int
setRenderType
(CommandSourceStack pSource, Objective pObjective, ObjectiveCriteria.RenderType pRenderType) private static int
setScore
(CommandSourceStack pSource, Collection<ScoreHolder> pTargets, Objective pObjective, int pNewValue) private static int
setScoreDisplay
(CommandSourceStack pSource, Collection<ScoreHolder> pTargets, Objective pObjective, Component pDisplayName) private static int
setScoreNumberFormat
(CommandSourceStack pSource, Collection<ScoreHolder> pTargets, Objective pObjective, NumberFormat pNumberFormat) private static CompletableFuture
<com.mojang.brigadier.suggestion.Suggestions> suggestTriggers
(CommandSourceStack p_138511_, Collection<ScoreHolder> p_138512_, com.mojang.brigadier.suggestion.SuggestionsBuilder p_138513_)
-
Field Details
-
ERROR_OBJECTIVE_ALREADY_EXISTS
private static final com.mojang.brigadier.exceptions.SimpleCommandExceptionType ERROR_OBJECTIVE_ALREADY_EXISTS -
ERROR_DISPLAY_SLOT_ALREADY_EMPTY
private static final com.mojang.brigadier.exceptions.SimpleCommandExceptionType ERROR_DISPLAY_SLOT_ALREADY_EMPTY -
ERROR_DISPLAY_SLOT_ALREADY_SET
private static final com.mojang.brigadier.exceptions.SimpleCommandExceptionType ERROR_DISPLAY_SLOT_ALREADY_SET -
ERROR_TRIGGER_ALREADY_ENABLED
private static final com.mojang.brigadier.exceptions.SimpleCommandExceptionType ERROR_TRIGGER_ALREADY_ENABLED -
ERROR_NOT_TRIGGER
private static final com.mojang.brigadier.exceptions.SimpleCommandExceptionType ERROR_NOT_TRIGGER -
ERROR_NO_VALUE
private static final com.mojang.brigadier.exceptions.Dynamic2CommandExceptionType ERROR_NO_VALUE
-
-
Constructor Details
-
ScoreboardCommand
public ScoreboardCommand()
-
-
Method Details
-
register
public static void register(com.mojang.brigadier.CommandDispatcher<CommandSourceStack> p_138469_, CommandBuildContext p_324608_) -
addNumberFormats
private static com.mojang.brigadier.builder.ArgumentBuilder<CommandSourceStack,?> addNumberFormats(CommandBuildContext p_323655_, com.mojang.brigadier.builder.ArgumentBuilder<CommandSourceStack, ?> p_313757_, ScoreboardCommand.NumberFormatCommandExecutor p_313912_) -
createRenderTypeModify
private static com.mojang.brigadier.builder.LiteralArgumentBuilder<CommandSourceStack> createRenderTypeModify() -
suggestTriggers
private static CompletableFuture<com.mojang.brigadier.suggestion.Suggestions> suggestTriggers(CommandSourceStack p_138511_, Collection<ScoreHolder> p_138512_, com.mojang.brigadier.suggestion.SuggestionsBuilder p_138513_) -
getScore
private static int getScore(CommandSourceStack pSource, ScoreHolder pScoreHolder, Objective pObjective) throws com.mojang.brigadier.exceptions.CommandSyntaxException - Throws:
com.mojang.brigadier.exceptions.CommandSyntaxException
-
getFirstTargetName
-
performOperation
private static int performOperation(CommandSourceStack pSource, Collection<ScoreHolder> pTargets, Objective pTargetObjectives, OperationArgument.Operation pOperation, Collection<ScoreHolder> pSourceEntities, Objective pSourceObjective) throws com.mojang.brigadier.exceptions.CommandSyntaxException - Throws:
com.mojang.brigadier.exceptions.CommandSyntaxException
-
enableTrigger
private static int enableTrigger(CommandSourceStack pSource, Collection<ScoreHolder> pTargets, Objective pObjective) throws com.mojang.brigadier.exceptions.CommandSyntaxException - Throws:
com.mojang.brigadier.exceptions.CommandSyntaxException
-
resetScores
-
resetScore
private static int resetScore(CommandSourceStack pSource, Collection<ScoreHolder> pTargets, Objective pObjective) -
setScore
private static int setScore(CommandSourceStack pSource, Collection<ScoreHolder> pTargets, Objective pObjective, int pNewValue) -
setScoreDisplay
private static int setScoreDisplay(CommandSourceStack pSource, Collection<ScoreHolder> pTargets, Objective pObjective, @Nullable Component pDisplayName) -
setScoreNumberFormat
private static int setScoreNumberFormat(CommandSourceStack pSource, Collection<ScoreHolder> pTargets, Objective pObjective, @Nullable NumberFormat pNumberFormat) -
addScore
private static int addScore(CommandSourceStack pSource, Collection<ScoreHolder> pTargets, Objective pObjective, int pAmount) -
removeScore
private static int removeScore(CommandSourceStack pSource, Collection<ScoreHolder> pTargets, Objective pObjective, int pAmount) -
listTrackedPlayers
-
listTrackedPlayerScores
-
clearDisplaySlot
private static int clearDisplaySlot(CommandSourceStack pSource, DisplaySlot pSlot) throws com.mojang.brigadier.exceptions.CommandSyntaxException - Throws:
com.mojang.brigadier.exceptions.CommandSyntaxException
-
setDisplaySlot
private static int setDisplaySlot(CommandSourceStack pSource, DisplaySlot pSlot, Objective pObjective) throws com.mojang.brigadier.exceptions.CommandSyntaxException - Throws:
com.mojang.brigadier.exceptions.CommandSyntaxException
-
setDisplayName
private static int setDisplayName(CommandSourceStack pSource, Objective pObjective, Component pDisplayName) -
setDisplayAutoUpdate
private static int setDisplayAutoUpdate(CommandSourceStack pSource, Objective pObjective, boolean pDisplayAutoUpdate) -
setObjectiveFormat
private static int setObjectiveFormat(CommandSourceStack pSource, Objective pObjective, @Nullable NumberFormat pFormat) -
setRenderType
private static int setRenderType(CommandSourceStack pSource, Objective pObjective, ObjectiveCriteria.RenderType pRenderType) -
removeObjective
-
addObjective
private static int addObjective(CommandSourceStack pSource, String pName, ObjectiveCriteria pCriteria, Component pDisplayName) throws com.mojang.brigadier.exceptions.CommandSyntaxException - Throws:
com.mojang.brigadier.exceptions.CommandSyntaxException
-
listObjectives
-