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.SimpleCommandExceptionTypeprivate static final com.mojang.brigadier.exceptions.SimpleCommandExceptionTypeprivate static final com.mojang.brigadier.exceptions.Dynamic2CommandExceptionTypeprivate static final com.mojang.brigadier.exceptions.SimpleCommandExceptionTypeprivate static final com.mojang.brigadier.exceptions.SimpleCommandExceptionTypeprivate 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 intaddObjective(CommandSourceStack source, String name, ObjectiveCriteria criteria, Component displayName) private static intaddScore(CommandSourceStack source, Collection<ScoreHolder> targets, Objective objective, int amount) private static intclearDisplaySlot(CommandSourceStack source, DisplaySlot slot) private static com.mojang.brigadier.builder.LiteralArgumentBuilder<CommandSourceStack> private static intenableTrigger(CommandSourceStack source, Collection<ScoreHolder> targets, Objective objective) private static ComponentgetFirstTargetName(Collection<ScoreHolder> scores) private static intgetScore(CommandSourceStack source, ScoreHolder scoreHolder, Objective objective) private static intlistObjectives(CommandSourceStack source) private static intlistTrackedPlayers(CommandSourceStack source) private static intlistTrackedPlayerScores(CommandSourceStack source, ScoreHolder score) private static intperformOperation(CommandSourceStack source, Collection<ScoreHolder> targets, Objective targetObjectives, OperationArgument.Operation operation, Collection<ScoreHolder> sourceEntities, Objective sourceObjective) static voidregister(com.mojang.brigadier.CommandDispatcher<CommandSourceStack> dispatcher, CommandBuildContext context) private static intremoveObjective(CommandSourceStack source, Objective objective) private static intremoveScore(CommandSourceStack source, Collection<ScoreHolder> targets, Objective objective, int amount) private static intresetScore(CommandSourceStack source, Collection<ScoreHolder> targets, Objective objective) private static intresetScores(CommandSourceStack source, Collection<ScoreHolder> targets) private static intsetDisplayAutoUpdate(CommandSourceStack source, Objective objective, boolean displayAutoUpdate) private static intsetDisplayName(CommandSourceStack source, Objective objective, Component displayName) private static intsetDisplaySlot(CommandSourceStack source, DisplaySlot slot, Objective objective) private static intsetObjectiveFormat(CommandSourceStack source, Objective objective, NumberFormat format) private static intsetRenderType(CommandSourceStack source, Objective objective, ObjectiveCriteria.RenderType renderType) private static intsetScore(CommandSourceStack source, Collection<ScoreHolder> targets, Objective objective, int newValue) private static intsetScoreDisplay(CommandSourceStack source, Collection<ScoreHolder> targets, Objective objective, Component displayName) private static intsetScoreNumberFormat(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
-