Package net.minecraft.commands
Class CommandSourceStack
java.lang.Object
net.minecraft.commands.CommandSourceStack
- All Implemented Interfaces:
- ExecutionCommandSource<CommandSourceStack>,- SharedSuggestionProvider,- ICommandSourceStackExtension
- Direct Known Subclasses:
- ClientCommandSourceStack,- CommandTests.ErrorCatchingStack
public class CommandSourceStack
extends Object
implements ExecutionCommandSource<CommandSourceStack>, SharedSuggestionProvider, ICommandSourceStackExtension
- 
Nested Class SummaryNested classes/interfaces inherited from interface net.minecraft.commands.SharedSuggestionProviderSharedSuggestionProvider.ElementSuggestionType, SharedSuggestionProvider.TextCoordinates
- 
Field SummaryFieldsModifier and TypeFieldDescriptionprivate final EntityAnchorArgument.Anchorprivate final TaskChainerprivate final Componentprivate final Entitystatic final com.mojang.brigadier.exceptions.SimpleCommandExceptionTypestatic final com.mojang.brigadier.exceptions.SimpleCommandExceptionTypeprivate final ServerLevelprivate final intprivate final CommandResultCallbackprivate final Vec2private final MinecraftServerprivate final CommandSigningContextprivate final booleanfinal CommandSourceprivate final Stringprivate final Vec3
- 
Constructor SummaryConstructorsModifierConstructorDescriptionCommandSourceStack(CommandSource p_81302_, Vec3 p_81303_, Vec2 p_81304_, ServerLevel p_81305_, int p_81306_, String p_81307_, Component p_81308_, MinecraftServer p_81309_, Entity p_81310_) protectedCommandSourceStack(CommandSource p_282943_, Vec3 p_282023_, Vec2 p_282896_, ServerLevel p_282659_, int p_283075_, String p_282379_, Component p_282469_, MinecraftServer p_281590_, Entity p_281515_, boolean p_282415_, CommandResultCallback p_309630_, EntityAnchorArgument.Anchor p_282332_, CommandSigningContext p_283585_, TaskChainer p_282376_) 
- 
Method SummaryModifier and TypeMethodDescriptionprivate voidbroadcastToAdmins(Component p_81367_) callback()CompletableFuture<com.mojang.brigadier.suggestion.Suggestions>customSuggestion(com.mojang.brigadier.context.CommandContext<?> p_212324_) com.mojang.brigadier.CommandDispatcher<CommandSourceStack>facing(Entity p_81332_, EntityAnchorArgument.Anchor p_81333_) getLevel()voidhandleError(com.mojang.brigadier.exceptions.CommandExceptionType p_307548_, com.mojang.brigadier.Message p_307613_, boolean p_307560_, TraceCallbacks p_307654_) booleanhasPermission(int p_81370_) booleanisPlayer()booleanisSilent()levels()voidsendChatMessage(OutgoingChatMessage p_251464_, boolean p_252146_, ChatType.Bound p_250406_) voidsendFailure(Component p_81353_) voidsendSuccess(Supplier<Component> p_288979_, boolean p_289007_) voidsendSystemMessage(Component p_243331_) booleanshouldFilterMessageTo(ServerPlayer p_243268_) CompletableFuture<com.mojang.brigadier.suggestion.Suggestions>suggestRegistryElements(ResourceKey<? extends Registry<?>> p_212330_, SharedSuggestionProvider.ElementSuggestionType p_212331_, com.mojang.brigadier.suggestion.SuggestionsBuilder p_212332_, com.mojang.brigadier.context.CommandContext<?> p_212333_) withAnchor(EntityAnchorArgument.Anchor p_81351_) withCallback(CommandResultCallback p_309591_) withCallback(CommandResultCallback p_309575_, BinaryOperator<CommandResultCallback> p_305804_) withEntity(Entity p_81330_) withLevel(ServerLevel p_81328_) withMaximumPermission(int p_81359_) withPermission(int p_81326_) withPosition(Vec3 p_81349_) withRotation(Vec2 p_81347_) withSigningContext(CommandSigningContext p_230894_, TaskChainer p_302022_) withSource(CommandSource p_165485_) Methods inherited from class java.lang.Objectclone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface net.minecraft.commands.ExecutionCommandSourceclearCallbacks, handleErrorMethods inherited from interface net.neoforged.neoforge.common.extensions.ICommandSourceStackExtensiongetAdvancement, getRecipeManager, getScoreboard, getUnsidedLevelMethods inherited from interface net.minecraft.commands.SharedSuggestionProvidergetAbsoluteCoordinates, getCustomTabSugggestions, getRelevantCoordinates, getSelectedEntities, suggestRegistryElements
- 
Field Details- 
ERROR_NOT_PLAYERpublic static final com.mojang.brigadier.exceptions.SimpleCommandExceptionType ERROR_NOT_PLAYER
- 
ERROR_NOT_ENTITYpublic static final com.mojang.brigadier.exceptions.SimpleCommandExceptionType ERROR_NOT_ENTITY
- 
source
- 
worldPosition
- 
level
- 
permissionLevelprivate final int permissionLevel
- 
textName
- 
displayName
- 
server
- 
silentprivate final boolean silent
- 
entity
- 
resultCallback
- 
anchor
- 
rotation
- 
signingContext
- 
chatMessageChainer
 
- 
- 
Constructor Details- 
CommandSourceStackpublic CommandSourceStack(CommandSource p_81302_, Vec3 p_81303_, Vec2 p_81304_, ServerLevel p_81305_, int p_81306_, String p_81307_, Component p_81308_, MinecraftServer p_81309_, @Nullable Entity p_81310_) 
- 
CommandSourceStackprotected CommandSourceStack(CommandSource p_282943_, Vec3 p_282023_, Vec2 p_282896_, ServerLevel p_282659_, int p_283075_, String p_282379_, Component p_282469_, MinecraftServer p_281590_, @Nullable Entity p_281515_, boolean p_282415_, CommandResultCallback p_309630_, EntityAnchorArgument.Anchor p_282332_, CommandSigningContext p_283585_, TaskChainer p_282376_) 
 
- 
- 
Method Details- 
withSource
- 
withEntity
- 
withPosition
- 
withRotation
- 
withCallback- Specified by:
- withCallbackin interface- ExecutionCommandSource<CommandSourceStack>
 
- 
withCallbackpublic CommandSourceStack withCallback(CommandResultCallback p_309575_, BinaryOperator<CommandResultCallback> p_305804_) 
- 
withSuppressedOutput
- 
withPermission
- 
withMaximumPermission
- 
withAnchor
- 
withLevel
- 
facing
- 
facing
- 
withSigningContextpublic CommandSourceStack withSigningContext(CommandSigningContext p_230894_, TaskChainer p_302022_) 
- 
getDisplayName
- 
getTextName
- 
hasPermissionpublic boolean hasPermission(int p_81370_) - Specified by:
- hasPermissionin interface- ExecutionCommandSource<CommandSourceStack>
- Specified by:
- hasPermissionin interface- SharedSuggestionProvider
 
- 
getPosition
- 
getLevel
- 
getEntity
- 
getEntityOrException- Throws:
- com.mojang.brigadier.exceptions.CommandSyntaxException
 
- 
getPlayerOrExceptionpublic ServerPlayer getPlayerOrException() throws com.mojang.brigadier.exceptions.CommandSyntaxException- Throws:
- com.mojang.brigadier.exceptions.CommandSyntaxException
 
- 
getPlayer
- 
isPlayerpublic boolean isPlayer()
- 
getRotation
- 
getServer
- 
getAnchor
- 
getSigningContext
- 
getChatMessageChainer
- 
shouldFilterMessageTo
- 
sendChatMessagepublic void sendChatMessage(OutgoingChatMessage p_251464_, boolean p_252146_, ChatType.Bound p_250406_) 
- 
sendSystemMessage
- 
sendSuccess
- 
broadcastToAdmins
- 
sendFailure
- 
callback- Specified by:
- callbackin interface- ExecutionCommandSource<CommandSourceStack>
 
- 
getOnlinePlayerNames- Specified by:
- getOnlinePlayerNamesin interface- SharedSuggestionProvider
 
- 
getAllTeams- Specified by:
- getAllTeamsin interface- SharedSuggestionProvider
 
- 
getAvailableSounds- Specified by:
- getAvailableSoundsin interface- SharedSuggestionProvider
 
- 
getRecipeNames- Specified by:
- getRecipeNamesin interface- SharedSuggestionProvider
 
- 
customSuggestionpublic CompletableFuture<com.mojang.brigadier.suggestion.Suggestions> customSuggestion(com.mojang.brigadier.context.CommandContext<?> p_212324_) - Specified by:
- customSuggestionin interface- SharedSuggestionProvider
 
- 
levels- Specified by:
- levelsin interface- SharedSuggestionProvider
 
- 
registryAccess- Specified by:
- registryAccessin interface- SharedSuggestionProvider
 
- 
enabledFeatures- Specified by:
- enabledFeaturesin interface- SharedSuggestionProvider
 
- 
dispatcher- Specified by:
- dispatcherin interface- ExecutionCommandSource<CommandSourceStack>
 
- 
handleErrorpublic void handleError(com.mojang.brigadier.exceptions.CommandExceptionType p_307548_, com.mojang.brigadier.Message p_307613_, boolean p_307560_, @Nullable TraceCallbacks p_307654_) - Specified by:
- handleErrorin interface- ExecutionCommandSource<CommandSourceStack>
 
- 
isSilentpublic boolean isSilent()- Specified by:
- isSilentin interface- ExecutionCommandSource<CommandSourceStack>
 
 
-