net.minecraft.server.command

public class ServerCommandSource

implements CommandSource, AbstractServerCommandSource<ServerCommandSource>

net.minecraft.commands.CommandSourceStack
net.minecraft.class_2168
net.minecraft.server.command.ServerCommandSource

Field summary

Modifier and TypeField
public static final com.mojang.brigadier.exceptions.SimpleCommandExceptionType
ERROR_NOT_PLAYER
field_9824
REQUIRES_PLAYER_EXCEPTION
public static final com.mojang.brigadier.exceptions.SimpleCommandExceptionType
ERROR_NOT_ENTITY
field_9827
REQUIRES_ENTITY_EXCEPTION
private final CommandOutput
source
field_9819
output
private final Vec3d
worldPosition
field_9817
position
private final ServerWorld
level
field_9828
world
private final PermissionPredicate
permissions
field_63437
permissions
private final String
textName
field_9826
name
private final Text
displayName
field_9825
displayName
private final MinecraftServer
server
field_9818
server
private final boolean
silent
field_9823
silent
private final Entity
entity
field_9820
entity
private final ReturnValueConsumer
resultCallback
field_47159
returnValueConsumer
private final EntityAnchorArgumentType$EntityAnchor
anchor
field_9816
entityAnchor
private final Vec2f
rotation
field_9822
rotation
private final SignedCommandArguments
signingContext
field_39183
signedArguments
private final FutureQueue
chatMessageChainer
field_39834
messageChainTaskQueue

Constructor summary

ModifierConstructor
public (CommandOutput output, Vec3d pos, Vec2f rot, ServerWorld world, PermissionPredicate permissions, String name, Text displayName, MinecraftServer server, Entity entity)
private (CommandOutput output, Vec3d pos, Vec2f rot, ServerWorld world, PermissionPredicate permissions, String name, Text displayName, MinecraftServer server, Entity entity, boolean silent, ReturnValueConsumer resultStorer, EntityAnchorArgumentType$EntityAnchor entityAnchor, SignedCommandArguments signedArguments, FutureQueue messageChainTaskQueue)

Method summary

Modifier and TypeMethod
public ServerCommandSource
withSource(CommandSource source)
method_36321(class_2165 arg0)
withOutput(CommandOutput output)
public ServerCommandSource
withEntity(Entity entity)
method_9232(class_1297 arg0)
withEntity(Entity entity)
public ServerCommandSource
withPosition(Vec3 pos)
method_9208(class_243 arg0)
withPosition(Vec3d position)
public ServerCommandSource
withRotation(Vec2 rotation)
method_9216(class_241 arg0)
withRotation(Vec2f rotation)
public ServerCommandSource
withCallback(CommandResultCallback resultCallback)
method_54307(class_8935 arg0)
withReturnValueConsumer(ReturnValueConsumer arg0)
public ServerCommandSource
withCallback(CommandResultCallback newCallback, BinaryOperator<CommandResultCallback> combiner)
method_9209(class_8935 arg0, BinaryOperator<class_8935> arg1)
mergeReturnValueConsumers(ReturnValueConsumer returnValueConsumer, BinaryOperator<ReturnValueConsumer> merger)
public ServerCommandSource
withSuppressedOutput()
method_9217()
withSilent()
public ServerCommandSource
withPermission(PermissionSet permissions)
method_9206(class_12096 arg0)
withPermissions(PermissionPredicate permissions)
public ServerCommandSource
withMaximumPermission(PermissionSet newPermissions)
method_9230(class_12096 arg0)
withAdditionalPermissions(PermissionPredicate permissions)
public ServerCommandSource
withAnchor(EntityAnchorArgument$Anchor anchor)
method_9218(class_2183$class_2184 arg0)
withEntityAnchor(EntityAnchorArgumentType$EntityAnchor anchor)
public ServerCommandSource
withLevel(ServerLevel level)
method_9227(class_3218 arg0)
withWorld(ServerWorld world)
public ServerCommandSource
facing(Entity entity, EntityAnchorArgument$Anchor anchor)
method_9220(class_1297 arg0, class_2183$class_2184 arg1)
withLookingAt(Entity entity, EntityAnchorArgumentType$EntityAnchor anchor)
public ServerCommandSource
facing(Vec3 pos)
method_9221(class_243 arg0)
withLookingAt(Vec3d position)
public ServerCommandSource
withSigningContext(CommandSigningContext signingContext, TaskChainer chatMessageChainer)
method_43735(class_7448 arg0, class_7620 arg1)
withSignedArguments(SignedCommandArguments signedArguments, FutureQueue messageChainTaskQueue)
public Text
getDisplayName()
method_9223()
getDisplayName()
public String
getTextName()
method_9214()
getName()
public PermissionPredicate
permissions()
method_75037()
getPermissions()
public Vec3d
getPosition()
method_9222()
getPosition()
public ServerWorld
getLevel()
method_9225()
getWorld()
public Entity
getEntity()
method_9228()
getEntity()
public Entity
getEntityOrException()
method_9229()
getEntityOrThrow()
public ServerPlayerEntity
getPlayerOrException()
method_9207()
getPlayerOrThrow()
public ServerPlayerEntity
getPlayer()
method_44023()
getPlayer()
public boolean
isPlayer()
method_43737()
isExecutedByPlayer()
public Vec2f
getRotation()
method_9210()
getRotation()
public MinecraftServer
getServer()
method_9211()
getServer()
public EntityAnchorArgumentType$EntityAnchor
getAnchor()
method_9219()
getEntityAnchor()
public SignedCommandArguments
getSigningContext()
method_43738()
getSignedArguments()
public FutureQueue
getChatMessageChainer()
method_44909()
getMessageChainTaskQueue()
public boolean
shouldFilterMessageTo(ServerPlayer receiver)
method_45067(class_3222 arg0)
shouldFilterText(ServerPlayerEntity recipient)
public void
sendChatMessage(OutgoingChatMessage message, boolean filtered, ChatType$Bound chatType)
method_44749(class_7604 arg0, boolean arg1, class_2556$class_7602 arg2)
sendChatMessage(SentMessage message, boolean filterMaskEnabled, MessageType$Parameters params)
public void
sendSystemMessage(Component message)
method_45068(class_2561 arg0)
sendMessage(Text message)
public void
sendSuccess(Supplier<Component> messageSupplier, boolean broadcast)
method_9226(Supplier<class_2561> arg0, boolean arg1)
sendFeedback(Supplier<Text> feedbackSupplier, boolean broadcastToOps)
private void
broadcastToAdmins(Component message)
method_9212(class_2561 arg0)
sendToOps(Text message)
public void
sendFailure(Component message)
method_9213(class_2561 arg0)
sendError(Text message)
public ReturnValueConsumer
callback()
method_54881()
getReturnValueConsumer()
public Collection<String>
getOnlinePlayerNames()
method_9262()
getPlayerNames()
public Collection<String>
getAllTeams()
method_9267()
getTeamNames()
public Stream<Identifier>
getAvailableSounds()
method_9254()
getSoundIds()
public CompletableFuture<com.mojang.brigadier.suggestion.Suggestions>
customSuggestion(com.mojang.brigadier.context.CommandContext<?> context)
method_9261(com.mojang.brigadier.context.CommandContext<?> arg0)
getCompletions(com.mojang.brigadier.context.CommandContext<?> arg0)
public CompletableFuture<com.mojang.brigadier.suggestion.Suggestions>
suggestRegistryElements(ResourceKey<? extends Registry<?>> key, SharedSuggestionProvider$ElementSuggestionType elements, com.mojang.brigadier.suggestion.SuggestionsBuilder builder, com.mojang.brigadier.context.CommandContext<?> context)
method_41213(class_5321<? extends class_2378<?>> arg0, class_2172$class_7078 arg1, com.mojang.brigadier.suggestion.SuggestionsBuilder arg2, com.mojang.brigadier.context.CommandContext<?> arg3)
listIdSuggestions(RegistryKey<? extends Registry<?>> arg0, CommandSource$SuggestedIdType arg1, com.mojang.brigadier.suggestion.SuggestionsBuilder arg2, com.mojang.brigadier.context.CommandContext<?> arg3)
private Optional<? extends RegistryWrapper<?>>
getLookup(ResourceKey<? extends Registry<?>> key)
method_71773(class_5321<? extends class_2378<?>> arg0)
getRegistry(RegistryKey<? extends Registry<?>> registryRef)
public Set<RegistryKey<World>>
levels()
method_29310()
getWorldKeys()
public DynamicRegistryManager
registryAccess()
method_30497()
getRegistryManager()
public FeatureSet
enabledFeatures()
method_45549()
getEnabledFeatures()
public com.mojang.brigadier.CommandDispatcher<ServerCommandSource>
dispatcher()
method_54310()
getDispatcher()
public void
handleError(com.mojang.brigadier.exceptions.CommandExceptionType type, com.mojang.brigadier.Message message, boolean forked, TraceCallbacks tracer)
method_54491(com.mojang.brigadier.exceptions.CommandExceptionType arg0, com.mojang.brigadier.Message arg1, boolean arg2, class_6346 arg3)
handleException(com.mojang.brigadier.exceptions.CommandExceptionType arg0, com.mojang.brigadier.Message arg1, boolean arg2, Tracer arg3)
public boolean
isSilent()
method_54882()
isSilent()
public AbstractServerCommandSource
withCallback(CommandResultCallback resultCallback)
method_54307(class_8935 arg0)
withReturnValueConsumer(ReturnValueConsumer arg0)
private CompletableFuture
lambda$suggestRegistryElements$1(SharedSuggestionProvider$ElementSuggestionType arg0, com.mojang.brigadier.suggestion.SuggestionsBuilder arg1, HolderLookup arg2)
method_41212(class_2172$class_7078 arg0, com.mojang.brigadier.suggestion.SuggestionsBuilder arg1, class_7225 arg2)
method_41212(CommandSource$SuggestedIdType arg0, com.mojang.brigadier.suggestion.SuggestionsBuilder arg1, RegistryWrapper registry)
private static Identifier
lambda$suggestRegistryElements$0(RecipeHolder arg0)
method_64830(class_8786 arg0)
method_64830(RecipeEntry recipe)