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 pContext, com.mojang.brigadier.builder.ArgumentBuilder<CommandSourceStack, ?> pArgumentBuilder, ScoreboardCommand.NumberFormatCommandExecutor pExecutor) private static intaddObjective(CommandSourceStack pSource, String pName, ObjectiveCriteria pCriteria, Component pDisplayName) private static intaddScore(CommandSourceStack pSource, Collection<ScoreHolder> pTargets, Objective pObjective, int pAmount) private static intclearDisplaySlot(CommandSourceStack pSource, DisplaySlot pSlot) private static com.mojang.brigadier.builder.LiteralArgumentBuilder<CommandSourceStack> private static intenableTrigger(CommandSourceStack pSource, Collection<ScoreHolder> pTargets, Objective pObjective) private static ComponentgetFirstTargetName(Collection<ScoreHolder> pScores) private static intgetScore(CommandSourceStack pSource, ScoreHolder pScoreHolder, Objective pObjective) private static intlistObjectives(CommandSourceStack pSource) private static intlistTrackedPlayers(CommandSourceStack pSource) private static intlistTrackedPlayerScores(CommandSourceStack pSource, ScoreHolder pScore) private static intperformOperation(CommandSourceStack pSource, Collection<ScoreHolder> pTargets, Objective pTargetObjectives, OperationArgument.Operation pOperation, Collection<ScoreHolder> pSourceEntities, Objective pSourceObjective) static voidregister(com.mojang.brigadier.CommandDispatcher<CommandSourceStack> pDispatcher, CommandBuildContext pContext) private static intremoveObjective(CommandSourceStack pSource, Objective pObjective) private static intremoveScore(CommandSourceStack pSource, Collection<ScoreHolder> pTargets, Objective pObjective, int pAmount) private static intresetScore(CommandSourceStack pSource, Collection<ScoreHolder> pTargets, Objective pObjective) private static intresetScores(CommandSourceStack pSource, Collection<ScoreHolder> pTargets) private static intsetDisplayAutoUpdate(CommandSourceStack pSource, Objective pObjective, boolean pDisplayAutoUpdate) private static intsetDisplayName(CommandSourceStack pSource, Objective pObjective, Component pDisplayName) private static intsetDisplaySlot(CommandSourceStack pSource, DisplaySlot pSlot, Objective pObjective) private static intsetObjectiveFormat(CommandSourceStack pSource, Objective pObjective, NumberFormat pFormat) private static intsetRenderType(CommandSourceStack pSource, Objective pObjective, ObjectiveCriteria.RenderType pRenderType) private static intsetScore(CommandSourceStack pSource, Collection<ScoreHolder> pTargets, Objective pObjective, int pNewValue) private static intsetScoreDisplay(CommandSourceStack pSource, Collection<ScoreHolder> pTargets, Objective pObjective, Component pDisplayName) private static intsetScoreNumberFormat(CommandSourceStack pSource, Collection<ScoreHolder> pTargets, Objective pObjective, NumberFormat pNumberFormat) private static CompletableFuture<com.mojang.brigadier.suggestion.Suggestions> suggestTriggers(CommandSourceStack pSource, Collection<ScoreHolder> pTargets, com.mojang.brigadier.suggestion.SuggestionsBuilder pSuggestions)
-
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> pDispatcher, CommandBuildContext pContext) -
addNumberFormats
private static com.mojang.brigadier.builder.ArgumentBuilder<CommandSourceStack,?> addNumberFormats(CommandBuildContext pContext, com.mojang.brigadier.builder.ArgumentBuilder<CommandSourceStack, ?> pArgumentBuilder, ScoreboardCommand.NumberFormatCommandExecutor pExecutor) -
createRenderTypeModify
private static com.mojang.brigadier.builder.LiteralArgumentBuilder<CommandSourceStack> createRenderTypeModify() -
suggestTriggers
private static CompletableFuture<com.mojang.brigadier.suggestion.Suggestions> suggestTriggers(CommandSourceStack pSource, Collection<ScoreHolder> pTargets, com.mojang.brigadier.suggestion.SuggestionsBuilder pSuggestions) -
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
-