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, ?> top, ScoreboardCommand.NumberFormatCommandExecutor callback) private static intaddObjective(CommandSourceStack source, String name, ObjectiveCriteria criteria, Component displayName) private static intaddScore(CommandSourceStack source, Collection<ScoreHolder> names, Objective objective, int value) private static intclearDisplaySlot(CommandSourceStack source, DisplaySlot slot) private static com.mojang.brigadier.builder.LiteralArgumentBuilder<CommandSourceStack> private static intenableTrigger(CommandSourceStack source, Collection<ScoreHolder> names, Objective objective) private static ComponentgetFirstTargetName(Collection<ScoreHolder> names) private static intgetScore(CommandSourceStack source, ScoreHolder target, Objective objective) private static intlistObjectives(CommandSourceStack source) private static intlistTrackedPlayers(CommandSourceStack source) private static intlistTrackedPlayerScores(CommandSourceStack source, ScoreHolder entity) private static intperformOperation(CommandSourceStack source, Collection<ScoreHolder> targets, Objective targetObjective, OperationArgument.Operation operation, Collection<ScoreHolder> sources, 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> names, Objective objective, int value) private static intresetScore(CommandSourceStack source, Collection<ScoreHolder> names, Objective objective) private static intresetScores(CommandSourceStack source, Collection<ScoreHolder> names) 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, @Nullable NumberFormat numberFormat) private static intsetRenderType(CommandSourceStack source, Objective objective, ObjectiveCriteria.RenderType renderType) private static intsetScore(CommandSourceStack source, Collection<ScoreHolder> names, Objective objective, int value) private static intsetScoreDisplay(CommandSourceStack source, Collection<ScoreHolder> names, Objective objective, @Nullable Component display) private static intsetScoreNumberFormat(CommandSourceStack source, Collection<ScoreHolder> names, Objective objective, @Nullable NumberFormat numberFormat) private static CompletableFuture<com.mojang.brigadier.suggestion.Suggestions> suggestTriggers(CommandSourceStack source, Collection<ScoreHolder> targets, com.mojang.brigadier.suggestion.SuggestionsBuilder builder)
-
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, ?> top, ScoreboardCommand.NumberFormatCommandExecutor callback) -
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 builder) -
getScore
private static int getScore(CommandSourceStack source, ScoreHolder target, 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 targetObjective, OperationArgument.Operation operation, Collection<ScoreHolder> sources, Objective sourceObjective) throws com.mojang.brigadier.exceptions.CommandSyntaxException - Throws:
com.mojang.brigadier.exceptions.CommandSyntaxException
-
enableTrigger
private static int enableTrigger(CommandSourceStack source, Collection<ScoreHolder> names, Objective objective) throws com.mojang.brigadier.exceptions.CommandSyntaxException - Throws:
com.mojang.brigadier.exceptions.CommandSyntaxException
-
resetScores
-
resetScore
private static int resetScore(CommandSourceStack source, Collection<ScoreHolder> names, Objective objective) -
setScore
private static int setScore(CommandSourceStack source, Collection<ScoreHolder> names, Objective objective, int value) -
setScoreDisplay
private static int setScoreDisplay(CommandSourceStack source, Collection<ScoreHolder> names, Objective objective, @Nullable Component display) -
setScoreNumberFormat
private static int setScoreNumberFormat(CommandSourceStack source, Collection<ScoreHolder> names, Objective objective, @Nullable NumberFormat numberFormat) -
addScore
private static int addScore(CommandSourceStack source, Collection<ScoreHolder> names, Objective objective, int value) -
removeScore
private static int removeScore(CommandSourceStack source, Collection<ScoreHolder> names, Objective objective, int value) -
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 numberFormat) -
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
-