Interface FabricClientCommandSource
- All Superinterfaces:
net.minecraft.command.CommandSource
@Environment(CLIENT)
public interface FabricClientCommandSource
extends net.minecraft.command.CommandSource
Extensions to
CommandSource
for client-sided commands.-
Nested Class Summary
Nested classes/interfaces inherited from interface net.minecraft.command.CommandSource
net.minecraft.command.CommandSource.RelativePosition
-
Method Summary
Modifier and TypeMethodDescriptionnet.minecraft.client.MinecraftClient
Gets the client instance used to run the command.net.minecraft.client.network.ClientPlayerEntity
Gets the player that used the command.net.minecraft.client.world.ClientWorld
getWorld()
Gets the world where the player used the command.void
sendError(net.minecraft.text.Text message)
Sends an error message to the player.void
sendFeedback(net.minecraft.text.Text message)
Sends a feedback message to the player.Methods inherited from interface net.minecraft.command.CommandSource
getBlockPositionSuggestions, getCompletions, getEntitySuggestions, getPlayerNames, getPositionSuggestions, getRecipeIds, getRegistryManager, getSoundIds, getTeamNames, getWorldKeys, hasPermissionLevel
-
Method Details
-
sendFeedback
void sendFeedback(net.minecraft.text.Text message)Sends a feedback message to the player.- Parameters:
message
- the feedback message
-
sendError
void sendError(net.minecraft.text.Text message)Sends an error message to the player.- Parameters:
message
- the error message
-
getClient
net.minecraft.client.MinecraftClient getClient()Gets the client instance used to run the command.- Returns:
- the client
-
getPlayer
net.minecraft.client.network.ClientPlayerEntity getPlayer()Gets the player that used the command.- Returns:
- the player
-
getWorld
net.minecraft.client.world.ClientWorld getWorld()Gets the world where the player used the command.- Returns:
- the world
-