Interface FabricClientCommandSource
- All Superinterfaces:
net.minecraft.server.permissions.PermissionSetSupplier, net.minecraft.commands.SharedSuggestionProvider
public interface FabricClientCommandSource
extends net.minecraft.commands.SharedSuggestionProvider
Extensions to
SharedSuggestionProvider for client-sided commands.-
Nested Class Summary
Nested classes/interfaces inherited from interface net.minecraft.commands.SharedSuggestionProvider
net.minecraft.commands.SharedSuggestionProvider.ElementSuggestionType, net.minecraft.commands.SharedSuggestionProvider.TextCoordinates -
Field Summary
Fields inherited from interface net.minecraft.commands.SharedSuggestionProvider
MATCH_SPLITTER -
Method Summary
Modifier and TypeMethodDescriptionnet.minecraft.client.MinecraftGets the client instance used to run the command.default net.minecraft.world.entity.EntityGets the entity that used the command.net.minecraft.client.multiplayer.ClientLevelgetLevel()Gets the level where the player used the command.default @Nullable ObjectGets the meta property underkeythat was assigned to this source.net.minecraft.client.player.LocalPlayerGets the player that used the command.default net.minecraft.world.phys.Vec3Gets the position from where the command has been executed.default net.minecraft.world.phys.Vec2Gets the rotation of the entity that used the command.voidsendError(net.minecraft.network.chat.Component message) Sends an error message to the player.voidsendFeedback(net.minecraft.network.chat.Component message) Sends a feedback message to the player.Methods inherited from interface net.minecraft.server.permissions.PermissionSetSupplier
permissionsMethods inherited from interface net.minecraft.commands.SharedSuggestionProvider
customSuggestion, enabledFeatures, getAbsoluteCoordinates, getAllTeams, getAvailableSounds, getCustomTabSuggestions, getOnlinePlayerNames, getRelevantCoordinates, getSelectedEntities, levels, registryAccess, suggestRegistryElements, suggestRegistryElements
-
Method Details
-
sendFeedback
void sendFeedback(net.minecraft.network.chat.Component message) Sends a feedback message to the player.- Parameters:
message- the feedback message
-
sendError
void sendError(net.minecraft.network.chat.Component message) Sends an error message to the player.- Parameters:
message- the error message
-
getClient
net.minecraft.client.Minecraft getClient()Gets the client instance used to run the command.- Returns:
- the client
-
getPlayer
net.minecraft.client.player.LocalPlayer getPlayer()Gets the player that used the command.- Returns:
- the player
-
getEntity
default net.minecraft.world.entity.Entity getEntity()Gets the entity that used the command.- Returns:
- the entity
-
getPosition
default net.minecraft.world.phys.Vec3 getPosition()Gets the position from where the command has been executed.- Returns:
- the position
-
getRotation
default net.minecraft.world.phys.Vec2 getRotation()Gets the rotation of the entity that used the command.- Returns:
- the rotation
-
getLevel
net.minecraft.client.multiplayer.ClientLevel getLevel()Gets the level where the player used the command.- Returns:
- the level
-
getMeta
-