Class ScoreboardCommand
java.lang.Object
net.minecraft.server.commands.ScoreboardCommand
-
Nested Class Summary
Nested Classes -
Field Summary
FieldsModifier and TypeFieldDescriptionprivate static final SimpleCommandExceptionTypeprivate static final SimpleCommandExceptionTypeprivate static final Dynamic2CommandExceptionTypeprivate static final SimpleCommandExceptionTypeprivate static final SimpleCommandExceptionTypeprivate static final SimpleCommandExceptionType -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprivate static ArgumentBuilder<CommandSourceStack, ?> addNumberFormats(CommandBuildContext context, 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 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(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<Suggestions> suggestTriggers(CommandSourceStack source, Collection<ScoreHolder> targets, SuggestionsBuilder builder)
-
Field Details
-
ERROR_OBJECTIVE_ALREADY_EXISTS
-
ERROR_DISPLAY_SLOT_ALREADY_EMPTY
-
ERROR_DISPLAY_SLOT_ALREADY_SET
-
ERROR_TRIGGER_ALREADY_ENABLED
-
ERROR_NOT_TRIGGER
-
ERROR_NO_VALUE
-
-
Constructor Details
-
ScoreboardCommand
public ScoreboardCommand()
-
-
Method Details
-
register
public static void register(CommandDispatcher<CommandSourceStack> dispatcher, CommandBuildContext context) -
addNumberFormats
private static ArgumentBuilder<CommandSourceStack, ?> addNumberFormats(CommandBuildContext context, ArgumentBuilder<CommandSourceStack, ?> top, ScoreboardCommand.NumberFormatCommandExecutor callback) -
createRenderTypeModify
-
suggestTriggers
private static CompletableFuture<Suggestions> suggestTriggers(CommandSourceStack source, Collection<ScoreHolder> targets, SuggestionsBuilder builder) -
getScore
private static int getScore(CommandSourceStack source, ScoreHolder target, Objective objective) throws CommandSyntaxException - Throws:
CommandSyntaxException
-
getFirstTargetName
-
performOperation
private static int performOperation(CommandSourceStack source, Collection<ScoreHolder> targets, Objective targetObjective, OperationArgument.Operation operation, Collection<ScoreHolder> sources, Objective sourceObjective) throws CommandSyntaxException - Throws:
CommandSyntaxException
-
enableTrigger
private static int enableTrigger(CommandSourceStack source, Collection<ScoreHolder> names, Objective objective) throws CommandSyntaxException - Throws:
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 CommandSyntaxException - Throws:
CommandSyntaxException
-
setDisplaySlot
private static int setDisplaySlot(CommandSourceStack source, DisplaySlot slot, Objective objective) throws CommandSyntaxException - Throws:
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 CommandSyntaxException - Throws:
CommandSyntaxException
-
listObjectives
-