类 CommandSourceStack
java.lang.Object
net.minecraft.commands.CommandSourceStack
- 所有已实现的接口:
SharedSuggestionProvider
,IForgeCommandSourceStack
- 直接已知子类:
ClientCommandSourceStack
public class CommandSourceStack
extends Object
implements SharedSuggestionProvider, IForgeCommandSourceStack
-
嵌套类概要
从接口继承的嵌套类/接口 net.minecraft.commands.SharedSuggestionProvider
SharedSuggestionProvider.ElementSuggestionType, SharedSuggestionProvider.TextCoordinates
-
字段概要
字段修饰符和类型字段说明private final EntityAnchorArgument.Anchor
private final TaskChainer
private final com.mojang.brigadier.ResultConsumer<CommandSourceStack>
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 IntConsumer
private final Vec2
private final MinecraftServer
private final CommandSigningContext
private final boolean
final CommandSource
private final String
private final Vec3
-
构造器概要
构造器限定符构造器说明CommandSourceStack
(CommandSource pSource, Vec3 pWorldPosition, Vec2 pRotation, ServerLevel pLevel, int pPermissionLevel, String pTextName, Component pDisplayName, MinecraftServer pServer, Entity pEntity) protected
CommandSourceStack
(CommandSource pSource, Vec3 pWorldPosition, Vec2 pRotation, ServerLevel pLevel, int pPermissionLevel, String pTextName, Component pDisplayName, MinecraftServer pServer, Entity pEntity, boolean pSilent, com.mojang.brigadier.ResultConsumer<CommandSourceStack> pConsumer, EntityAnchorArgument.Anchor pAnchor, CommandSigningContext pSigningContext, TaskChainer pChatMessageContainer, IntConsumer pReturnValueConsumer) -
方法概要
修饰符和类型方法说明private void
broadcastToAdmins
(Component pMessage) CompletableFuture<com.mojang.brigadier.suggestion.Suggestions>
customSuggestion
(com.mojang.brigadier.context.CommandContext<?> pContext) facing
(Entity pEntity, EntityAnchorArgument.Anchor pAnchor) getLevel()
boolean
hasPermission
(int pLevel) boolean
isPlayer()
levels()
void
onCommandComplete
(com.mojang.brigadier.context.CommandContext<CommandSourceStack> pContext, boolean pSuccess, int pResult) void
sendChatMessage
(OutgoingChatMessage pMessage, boolean pShouldFilter, ChatType.Bound pBoundChatType) void
sendFailure
(Component pMessage) void
sendSuccess
(Supplier<Component> pMessageSupplier, boolean pAllowLogging) void
sendSystemMessage
(Component pMessage) boolean
shouldFilterMessageTo
(ServerPlayer pReceiver) CompletableFuture<com.mojang.brigadier.suggestion.Suggestions>
suggestRegistryElements
(ResourceKey<? extends Registry<?>> pResourceKey, SharedSuggestionProvider.ElementSuggestionType pRegistryKey, com.mojang.brigadier.suggestion.SuggestionsBuilder pBuilder, com.mojang.brigadier.context.CommandContext<?> pContext) withAnchor
(EntityAnchorArgument.Anchor pAnchor) withCallback
(com.mojang.brigadier.ResultConsumer<CommandSourceStack> pConsumer) withCallback
(com.mojang.brigadier.ResultConsumer<CommandSourceStack> pResultConsumer, BinaryOperator<com.mojang.brigadier.ResultConsumer<CommandSourceStack>> pResultConsumerSelector) withChatMessageChainer
(TaskChainer pChatMessageChainer) withEntity
(Entity pEntity) withLevel
(ServerLevel pLevel) withMaximumPermission
(int pPermissionLevel) withPermission
(int pPermissionLevel) withPosition
(Vec3 pPos) withReturnValueConsumer
(IntConsumer pReturnValueConsumer) withRotation
(Vec2 pRotation) withSigningContext
(CommandSigningContext pSigningContext) withSource
(CommandSource pSource) 从类继承的方法 java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
从接口继承的方法 net.minecraftforge.common.extensions.IForgeCommandSourceStack
getAdvancement, getRecipeManager, getScoreboard, getUnsidedLevel
从接口继承的方法 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
-
consumer
-
anchor
-
rotation
-
signingContext
-
chatMessageChainer
-
returnValueConsumer
-
-
构造器详细资料
-
CommandSourceStack
public CommandSourceStack(CommandSource pSource, Vec3 pWorldPosition, Vec2 pRotation, ServerLevel pLevel, int pPermissionLevel, String pTextName, Component pDisplayName, MinecraftServer pServer, @Nullable Entity pEntity) -
CommandSourceStack
protected CommandSourceStack(CommandSource pSource, Vec3 pWorldPosition, Vec2 pRotation, ServerLevel pLevel, int pPermissionLevel, String pTextName, Component pDisplayName, MinecraftServer pServer, @Nullable Entity pEntity, boolean pSilent, @Nullable com.mojang.brigadier.ResultConsumer<CommandSourceStack> pConsumer, EntityAnchorArgument.Anchor pAnchor, CommandSigningContext pSigningContext, TaskChainer pChatMessageContainer, IntConsumer pReturnValueConsumer)
-
-
方法详细资料
-
withSource
-
withEntity
-
withPosition
-
withRotation
-
withCallback
public CommandSourceStack withCallback(com.mojang.brigadier.ResultConsumer<CommandSourceStack> pConsumer) -
withCallback
public CommandSourceStack withCallback(com.mojang.brigadier.ResultConsumer<CommandSourceStack> pResultConsumer, BinaryOperator<com.mojang.brigadier.ResultConsumer<CommandSourceStack>> pResultConsumerSelector) -
withSuppressedOutput
-
withPermission
-
withMaximumPermission
-
withAnchor
-
withLevel
-
facing
-
facing
-
withSigningContext
-
withChatMessageChainer
-
withReturnValueConsumer
-
getDisplayName
-
getTextName
-
hasPermission
public boolean hasPermission(int pLevel) - 指定者:
hasPermission
在接口中SharedSuggestionProvider
-
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
-
getReturnValueConsumer
-
shouldFilterMessageTo
-
sendChatMessage
public void sendChatMessage(OutgoingChatMessage pMessage, boolean pShouldFilter, ChatType.Bound pBoundChatType) -
sendSystemMessage
-
sendSuccess
-
broadcastToAdmins
-
sendFailure
-
onCommandComplete
public void onCommandComplete(com.mojang.brigadier.context.CommandContext<CommandSourceStack> pContext, boolean pSuccess, int pResult) -
getOnlinePlayerNames
- 指定者:
getOnlinePlayerNames
在接口中SharedSuggestionProvider
-
getAllTeams
- 指定者:
getAllTeams
在接口中SharedSuggestionProvider
-
getAvailableSounds
- 指定者:
getAvailableSounds
在接口中SharedSuggestionProvider
-
getRecipeNames
- 指定者:
getRecipeNames
在接口中SharedSuggestionProvider
-
customSuggestion
public CompletableFuture<com.mojang.brigadier.suggestion.Suggestions> customSuggestion(com.mojang.brigadier.context.CommandContext<?> pContext) - 指定者:
customSuggestion
在接口中SharedSuggestionProvider
-
levels
- 指定者:
levels
在接口中SharedSuggestionProvider
-
registryAccess
- 指定者:
registryAccess
在接口中SharedSuggestionProvider
-
enabledFeatures
- 指定者:
enabledFeatures
在接口中SharedSuggestionProvider
-