类 CommandSourceStack
java.lang.Object
net.minecraft.commands.CommandSourceStack
- 所有已实现的接口:
ExecutionCommandSource<CommandSourceStack>
,PermissionSource
,SharedSuggestionProvider
,ICommandSourceStackExtension
- 直接已知子类:
CommandTests.ErrorCatchingStack
public class CommandSourceStack
extends Object
implements ExecutionCommandSource<CommandSourceStack>, PermissionSource, SharedSuggestionProvider, ICommandSourceStackExtension
-
嵌套类概要
从接口继承的嵌套类/接口 net.minecraft.commands.PermissionSource
PermissionSource.Check<T extends PermissionSource>
从接口继承的嵌套类/接口 net.minecraft.commands.SharedSuggestionProvider
SharedSuggestionProvider.ElementSuggestionType, SharedSuggestionProvider.TextCoordinates
-
字段概要
字段修饰符和类型字段说明private final EntityAnchorArgument.Anchor
private final TaskChainer
private final Component
private final Entity
static final com.mojang.brigadier.exceptions.SimpleCommandExceptionType
static final com.mojang.brigadier.exceptions.SimpleCommandExceptionType
private final ServerLevel
private final int
private final CommandResultCallback
private final Vec2
private final MinecraftServer
private final CommandSigningContext
private final boolean
final CommandSource
private final String
private final Vec3
从接口继承的字段 net.minecraft.commands.SharedSuggestionProvider
MATCH_SPLITTER
-
构造器概要
构造器限定符构造器说明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_, Entity p_81310_) protected
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_, Entity p_281515_, boolean p_282415_, CommandResultCallback p_309630_, EntityAnchorArgument.Anchor p_282332_, CommandSigningContext p_283585_, TaskChainer p_282376_) -
方法概要
修饰符和类型方法说明private void
broadcastToAdmins
(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()
private Optional
<? extends HolderLookup<?>> getLookup
(ResourceKey<? extends Registry<?>> p_425682_) void
handleError
(com.mojang.brigadier.exceptions.CommandExceptionType p_307548_, com.mojang.brigadier.Message p_307613_, boolean p_307560_, TraceCallbacks p_307654_) boolean
hasPermission
(int p_81370_) boolean
isPlayer()
boolean
isSilent()
levels()
void
sendChatMessage
(OutgoingChatMessage p_251464_, boolean p_252146_, ChatType.Bound p_250406_) void
sendFailure
(Component p_81353_) void
sendSuccess
(Supplier<Component> p_288979_, boolean p_289007_) void
sendSystemMessage
(Component p_243331_) boolean
shouldFilterMessageTo
(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_) 从类继承的方法 java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
从接口继承的方法 net.minecraft.commands.ExecutionCommandSource
clearCallbacks, handleError
从接口继承的方法 net.neoforged.neoforge.common.extensions.ICommandSourceStackExtension
getAdvancement, getScoreboard, getUnsidedLevel
从接口继承的方法 net.minecraft.commands.PermissionSource
allowsSelectors
从接口继承的方法 net.minecraft.commands.SharedSuggestionProvider
getAbsoluteCoordinates, getCustomTabSugggestions, getRelevantCoordinates, getSelectedEntities, suggestRegistryElements
-
字段详细资料
-
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
-
resultCallback
-
anchor
-
rotation
-
signingContext
-
chatMessageChainer
-
-
构造器详细资料
-
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_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_)
-
-
方法详细资料
-
withSource
-
withEntity
-
withPosition
-
withRotation
-
withCallback
- 指定者:
withCallback
在接口中ExecutionCommandSource<CommandSourceStack>
-
withCallback
public CommandSourceStack withCallback(CommandResultCallback p_309575_, BinaryOperator<CommandResultCallback> p_305804_) -
withSuppressedOutput
-
withPermission
-
withMaximumPermission
-
withAnchor
-
withLevel
-
facing
-
facing
-
withSigningContext
public CommandSourceStack withSigningContext(CommandSigningContext p_230894_, TaskChainer p_302022_) -
getDisplayName
-
getTextName
-
hasPermission
public boolean hasPermission(int p_81370_) - 指定者:
hasPermission
在接口中PermissionSource
-
getPosition
-
getLevel
-
getEntity
-
getEntityOrException
- 抛出:
com.mojang.brigadier.exceptions.CommandSyntaxException
-
getPlayerOrException
public ServerPlayer getPlayerOrException() throws com.mojang.brigadier.exceptions.CommandSyntaxException- 抛出:
com.mojang.brigadier.exceptions.CommandSyntaxException
-
getPlayer
-
isPlayer
public boolean isPlayer() -
getRotation
-
getServer
-
getAnchor
-
getSigningContext
-
getChatMessageChainer
-
shouldFilterMessageTo
-
sendChatMessage
public void sendChatMessage(OutgoingChatMessage p_251464_, boolean p_252146_, ChatType.Bound p_250406_) -
sendSystemMessage
-
sendSuccess
-
broadcastToAdmins
-
sendFailure
-
callback
- 指定者:
callback
在接口中ExecutionCommandSource<CommandSourceStack>
-
getOnlinePlayerNames
- 指定者:
getOnlinePlayerNames
在接口中SharedSuggestionProvider
-
getAllTeams
- 指定者:
getAllTeams
在接口中SharedSuggestionProvider
-
getAvailableSounds
- 指定者:
getAvailableSounds
在接口中SharedSuggestionProvider
-
customSuggestion
public CompletableFuture<com.mojang.brigadier.suggestion.Suggestions> customSuggestion(com.mojang.brigadier.context.CommandContext<?> p_212324_) - 指定者:
customSuggestion
在接口中SharedSuggestionProvider
-
getLookup
-
levels
- 指定者:
levels
在接口中SharedSuggestionProvider
-
registryAccess
- 指定者:
registryAccess
在接口中SharedSuggestionProvider
-
enabledFeatures
- 指定者:
enabledFeatures
在接口中SharedSuggestionProvider
-
dispatcher
- 指定者:
dispatcher
在接口中ExecutionCommandSource<CommandSourceStack>
-
handleError
public void handleError(com.mojang.brigadier.exceptions.CommandExceptionType p_307548_, com.mojang.brigadier.Message p_307613_, boolean p_307560_, @Nullable TraceCallbacks p_307654_) - 指定者:
handleError
在接口中ExecutionCommandSource<CommandSourceStack>
-
isSilent
public boolean isSilent()- 指定者:
isSilent
在接口中ExecutionCommandSource<CommandSourceStack>
-