Interface QuiltClientCommandSource

All Superinterfaces:
net.minecraft.command.CommandSource

@ClientOnly @InjectedInterface(net.minecraft.client.network.ClientCommandSource.class) public interface QuiltClientCommandSource extends net.minecraft.command.CommandSource
Extensions to CommandSource, implemented on ClientCommandSource for client commands - most of these methods are equivalents to methods on ServerCommandSource, to provide a more familiar API.
  • Nested Class Summary

    Nested classes/interfaces inherited from interface net.minecraft.command.CommandSource

    net.minecraft.command.CommandSource.ElementSuggestionType, net.minecraft.command.CommandSource.RelativePosition
  • Field Summary

    Fields inherited from interface net.minecraft.command.CommandSource

    field_55224
  • Method Summary

    Modifier and Type
    Method
    Description
    net.minecraft.client.MinecraftClient
    Gets the client instance used to run the command.
    default net.minecraft.entity.Entity
    Gets the entity that used the command.
    Gets the meta property under key that was assigned to this source.
    net.minecraft.client.network.ClientPlayerEntity
    Gets the player that used the command.
    default net.minecraft.util.math.Vec3d
    Gets the position from where the command has been executed.
    default net.minecraft.util.math.Vec2f
    Gets the rotation of the entity that used the command.
    net.minecraft.client.world.ClientWorld
    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.
    void
    setMeta(String key, Object value)
    Sets the meta property under key key with the value value.

    Methods inherited from interface net.minecraft.command.CommandSource

    getBlockPositionSuggestions, getCompletions, getEnabledFlags, getEntitySuggestions, getNames, getPlayerNames, getPositionSuggestions, getRegistryManager, getSoundIds, getTeamNames, getWorldKeys, hasPermission, suggestRegistryElements, suggestRegistryElements
  • 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
    • getEntity

      default net.minecraft.entity.Entity getEntity()
      Gets the entity that used the command.
      Returns:
      the entity
    • getPosition

      default net.minecraft.util.math.Vec3d getPosition()
      Gets the position from where the command has been executed.
      Returns:
      the position
    • getRotation

      default net.minecraft.util.math.Vec2f getRotation()
      Gets the rotation of the entity that used the command.
      Returns:
      the rotation
    • getWorld

      net.minecraft.client.world.ClientWorld getWorld()
      Gets the world where the player used the command.
      Returns:
      the world
    • getMeta

      Object getMeta(String key)
      Gets the meta property under key that was assigned to this source.

      This method should return the same result for every call with the same key.

      Parameters:
      key - the meta key
      Returns:
      the meta
    • setMeta

      void setMeta(String key, Object value)
      Sets the meta property under key key with the value value.
      Parameters:
      key - the meta key
      value - the meta value