Package net.minecraft.commands
Class CommandSourceStack
java.lang.Object
net.minecraft.commands.CommandSourceStack
- All Implemented Interfaces:
SharedSuggestionProvider
-
Nested Class Summary
Nested classes/interfaces inherited from interface net.minecraft.commands.SharedSuggestionProvider
SharedSuggestionProvider.TextCoordinates -
Field Summary
FieldsModifier and TypeFieldDescriptionprivate EntityAnchorArgument.Anchorprivate com.mojang.brigadier.ResultConsumer<CommandSourceStack>private Componentprivate Entitystatic com.mojang.brigadier.exceptions.SimpleCommandExceptionTypestatic com.mojang.brigadier.exceptions.SimpleCommandExceptionTypeprivate ServerLevelprivate intprivate Vec2private MinecraftServerprivate booleanprivate CommandSourceprivate Stringprivate Vec3 -
Constructor Summary
ConstructorsModifierConstructorDescriptionCommandSourceStack(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_81312_, Vec3 p_81313_, Vec2 p_81314_, ServerLevel p_81315_, int p_81316_, String p_81317_, Component p_81318_, MinecraftServer p_81319_, Entity p_81320_, boolean p_81321_, com.mojang.brigadier.ResultConsumer<CommandSourceStack> p_81322_, EntityAnchorArgument.Anchor p_81323_) -
Method Summary
Modifier and TypeMethodDescriptionprivate voidbroadcastToAdmins(Component p_81367_)CompletableFuture<com.mojang.brigadier.suggestion.Suggestions>customSuggestion(com.mojang.brigadier.context.CommandContext<SharedSuggestionProvider> p_81340_, com.mojang.brigadier.suggestion.SuggestionsBuilder p_81341_)facing(Entity p_81332_, EntityAnchorArgument.Anchor p_81333_)getLevel()booleanhasPermission(int p_81370_)levels()voidonCommandComplete(com.mojang.brigadier.context.CommandContext<CommandSourceStack> p_81343_, boolean p_81344_, int p_81345_)voidsendFailure(Component p_81353_)voidsendSuccess(Component p_81355_, boolean p_81356_)withAnchor(EntityAnchorArgument.Anchor p_81351_)withCallback(com.mojang.brigadier.ResultConsumer<CommandSourceStack> p_81335_)withCallback(com.mojang.brigadier.ResultConsumer<CommandSourceStack> p_81337_, BinaryOperator<com.mojang.brigadier.ResultConsumer<CommandSourceStack>> p_81338_)withEntity(Entity p_81330_)withLevel(ServerLevel p_81328_)withMaximumPermission(int p_81359_)withPermission(int p_81326_)withPosition(Vec3 p_81349_)withRotation(Vec2 p_81347_)withSource(CommandSource p_165485_)Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface net.minecraft.commands.SharedSuggestionProvider
getAbsoluteCoordinates, getRelevantCoordinates, getSelectedEntities
-
Field Details
-
ERROR_NOT_PLAYER
public static final com.mojang.brigadier.exceptions.SimpleCommandExceptionType ERROR_NOT_PLAYER -
ERROR_NOT_ENTITY
public static final com.mojang.brigadier.exceptions.SimpleCommandExceptionType ERROR_NOT_ENTITY -
source
-
worldPosition
-
level
-
permissionLevel
private final int permissionLevel -
textName
-
displayName
-
server
-
silent
private final boolean silent -
entity
-
consumer
-
anchor
-
rotation
-
-
Constructor Details
-
CommandSourceStack
public 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_) -
CommandSourceStack
protected CommandSourceStack(CommandSource p_81312_, Vec3 p_81313_, Vec2 p_81314_, ServerLevel p_81315_, int p_81316_, String p_81317_, Component p_81318_, MinecraftServer p_81319_, @Nullable Entity p_81320_, boolean p_81321_, com.mojang.brigadier.ResultConsumer<CommandSourceStack> p_81322_, EntityAnchorArgument.Anchor p_81323_)
-
-
Method Details
-
withSource
-
withEntity
-
withPosition
-
withRotation
-
withCallback
public CommandSourceStack withCallback(com.mojang.brigadier.ResultConsumer<CommandSourceStack> p_81335_) -
withCallback
public CommandSourceStack withCallback(com.mojang.brigadier.ResultConsumer<CommandSourceStack> p_81337_, BinaryOperator<com.mojang.brigadier.ResultConsumer<CommandSourceStack>> p_81338_) -
withSuppressedOutput
-
withPermission
-
withMaximumPermission
-
withAnchor
-
withLevel
-
facing
-
facing
-
getDisplayName
-
getTextName
-
hasPermission
public boolean hasPermission(int p_81370_)- Specified by:
hasPermissionin interfaceSharedSuggestionProvider
-
getPosition
-
getLevel
-
getEntity
-
getEntityOrException
- Throws:
com.mojang.brigadier.exceptions.CommandSyntaxException
-
getPlayerOrException
public ServerPlayer getPlayerOrException() throws com.mojang.brigadier.exceptions.CommandSyntaxException- Throws:
com.mojang.brigadier.exceptions.CommandSyntaxException
-
getRotation
-
getServer
-
getAnchor
-
sendSuccess
-
broadcastToAdmins
-
sendFailure
-
onCommandComplete
public void onCommandComplete(com.mojang.brigadier.context.CommandContext<CommandSourceStack> p_81343_, boolean p_81344_, int p_81345_) -
getOnlinePlayerNames
- Specified by:
getOnlinePlayerNamesin interfaceSharedSuggestionProvider
-
getAllTeams
- Specified by:
getAllTeamsin interfaceSharedSuggestionProvider
-
getAvailableSoundEvents
- Specified by:
getAvailableSoundEventsin interfaceSharedSuggestionProvider
-
getRecipeNames
- Specified by:
getRecipeNamesin interfaceSharedSuggestionProvider
-
customSuggestion
public CompletableFuture<com.mojang.brigadier.suggestion.Suggestions> customSuggestion(com.mojang.brigadier.context.CommandContext<SharedSuggestionProvider> p_81340_, com.mojang.brigadier.suggestion.SuggestionsBuilder p_81341_)- Specified by:
customSuggestionin interfaceSharedSuggestionProvider
-
levels
- Specified by:
levelsin interfaceSharedSuggestionProvider
-
registryAccess
- Specified by:
registryAccessin interfaceSharedSuggestionProvider
-