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 context, com.mojang.brigadier.builder.ArgumentBuilder<CommandSourceStack, ?> argumentBuilder, ScoreboardCommand.NumberFormatCommandExecutor executor) private static int
addObjective
(CommandSourceStack source, String name, ObjectiveCriteria criteria, Component displayName) private static int
addScore
(CommandSourceStack source, Collection<ScoreHolder> targets, Objective objective, int amount) private static int
clearDisplaySlot
(CommandSourceStack source, DisplaySlot slot) private static com.mojang.brigadier.builder.LiteralArgumentBuilder
<CommandSourceStack> private static int
enableTrigger
(CommandSourceStack source, Collection<ScoreHolder> targets, Objective objective) private static Component
getFirstTargetName
(Collection<ScoreHolder> scores) private static int
getScore
(CommandSourceStack source, ScoreHolder scoreHolder, Objective objective) private static int
listObjectives
(CommandSourceStack source) private static int
listTrackedPlayers
(CommandSourceStack source) private static int
listTrackedPlayerScores
(CommandSourceStack source, ScoreHolder score) private static int
performOperation
(CommandSourceStack source, Collection<ScoreHolder> targets, Objective targetObjectives, OperationArgument.Operation operation, Collection<ScoreHolder> sourceEntities, Objective sourceObjective) static void
register
(com.mojang.brigadier.CommandDispatcher<CommandSourceStack> dispatcher, CommandBuildContext context) private static int
removeObjective
(CommandSourceStack source, Objective objective) private static int
removeScore
(CommandSourceStack source, Collection<ScoreHolder> targets, Objective objective, int amount) private static int
resetScore
(CommandSourceStack source, Collection<ScoreHolder> targets, Objective objective) private static int
resetScores
(CommandSourceStack source, Collection<ScoreHolder> targets) private static int
setDisplayAutoUpdate
(CommandSourceStack source, Objective objective, boolean displayAutoUpdate) private static int
setDisplayName
(CommandSourceStack source, Objective objective, Component displayName) private static int
setDisplaySlot
(CommandSourceStack source, DisplaySlot slot, Objective objective) private static int
setObjectiveFormat
(CommandSourceStack source, Objective objective, NumberFormat format) private static int
setRenderType
(CommandSourceStack source, Objective objective, ObjectiveCriteria.RenderType renderType) private static int
setScore
(CommandSourceStack source, Collection<ScoreHolder> targets, Objective objective, int newValue) private static int
setScoreDisplay
(CommandSourceStack source, Collection<ScoreHolder> targets, Objective objective, Component displayName) private static int
setScoreNumberFormat
(CommandSourceStack source, Collection<ScoreHolder> targets, Objective objective, NumberFormat numberFormat) private static CompletableFuture
<com.mojang.brigadier.suggestion.Suggestions> suggestTriggers
(CommandSourceStack source, Collection<ScoreHolder> targets, com.mojang.brigadier.suggestion.SuggestionsBuilder suggestions)
-
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> dispatcher, CommandBuildContext context) -
addNumberFormats
private static com.mojang.brigadier.builder.ArgumentBuilder<CommandSourceStack,?> addNumberFormats(CommandBuildContext context, com.mojang.brigadier.builder.ArgumentBuilder<CommandSourceStack, ?> argumentBuilder, ScoreboardCommand.NumberFormatCommandExecutor executor) -
createRenderTypeModify
private static com.mojang.brigadier.builder.LiteralArgumentBuilder<CommandSourceStack> createRenderTypeModify() -
suggestTriggers
private static CompletableFuture<com.mojang.brigadier.suggestion.Suggestions> suggestTriggers(CommandSourceStack source, Collection<ScoreHolder> targets, com.mojang.brigadier.suggestion.SuggestionsBuilder suggestions) -
getScore
private static int getScore(CommandSourceStack source, ScoreHolder scoreHolder, Objective objective) throws com.mojang.brigadier.exceptions.CommandSyntaxException - Throws:
com.mojang.brigadier.exceptions.CommandSyntaxException
-
getFirstTargetName
-
performOperation
private static int performOperation(CommandSourceStack source, Collection<ScoreHolder> targets, Objective targetObjectives, OperationArgument.Operation operation, Collection<ScoreHolder> sourceEntities, Objective sourceObjective) throws com.mojang.brigadier.exceptions.CommandSyntaxException - Throws:
com.mojang.brigadier.exceptions.CommandSyntaxException
-
enableTrigger
private static int enableTrigger(CommandSourceStack source, Collection<ScoreHolder> targets, Objective objective) throws com.mojang.brigadier.exceptions.CommandSyntaxException - Throws:
com.mojang.brigadier.exceptions.CommandSyntaxException
-
resetScores
-
resetScore
private static int resetScore(CommandSourceStack source, Collection<ScoreHolder> targets, Objective objective) -
setScore
private static int setScore(CommandSourceStack source, Collection<ScoreHolder> targets, Objective objective, int newValue) -
setScoreDisplay
private static int setScoreDisplay(CommandSourceStack source, Collection<ScoreHolder> targets, Objective objective, @Nullable Component displayName) -
setScoreNumberFormat
private static int setScoreNumberFormat(CommandSourceStack source, Collection<ScoreHolder> targets, Objective objective, @Nullable NumberFormat numberFormat) -
addScore
private static int addScore(CommandSourceStack source, Collection<ScoreHolder> targets, Objective objective, int amount) -
removeScore
private static int removeScore(CommandSourceStack source, Collection<ScoreHolder> targets, Objective objective, int amount) -
listTrackedPlayers
-
listTrackedPlayerScores
-
clearDisplaySlot
private static int clearDisplaySlot(CommandSourceStack source, DisplaySlot slot) throws com.mojang.brigadier.exceptions.CommandSyntaxException - Throws:
com.mojang.brigadier.exceptions.CommandSyntaxException
-
setDisplaySlot
private static int setDisplaySlot(CommandSourceStack source, DisplaySlot slot, Objective objective) throws com.mojang.brigadier.exceptions.CommandSyntaxException - Throws:
com.mojang.brigadier.exceptions.CommandSyntaxException
-
setDisplayName
private static int setDisplayName(CommandSourceStack source, Objective objective, Component displayName) -
setDisplayAutoUpdate
private static int setDisplayAutoUpdate(CommandSourceStack source, Objective objective, boolean displayAutoUpdate) -
setObjectiveFormat
private static int setObjectiveFormat(CommandSourceStack source, Objective objective, @Nullable NumberFormat format) -
setRenderType
private static int setRenderType(CommandSourceStack source, Objective objective, ObjectiveCriteria.RenderType renderType) -
removeObjective
-
addObjective
private static int addObjective(CommandSourceStack source, String name, ObjectiveCriteria criteria, Component displayName) throws com.mojang.brigadier.exceptions.CommandSyntaxException - Throws:
com.mojang.brigadier.exceptions.CommandSyntaxException
-
listObjectives
-