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 Type
    Method
    Description
    net.minecraft.client.Minecraft
    Gets the client instance used to run the command.
    default net.minecraft.world.entity.Entity
    Gets the entity that used the command.
    net.minecraft.client.multiplayer.ClientLevel
    Gets the level where the player used the command.
    default @Nullable Object
    Gets the meta property under key that was assigned to this source.
    net.minecraft.client.player.LocalPlayer
    Gets the player that used the command.
    default net.minecraft.world.phys.Vec3
    Gets the position from where the command has been executed.
    default net.minecraft.world.phys.Vec2
    Gets the rotation of the entity that used the command.
    void
    sendError(net.minecraft.network.chat.Component message)
    Sends an error message to the player.
    void
    sendFeedback(net.minecraft.network.chat.Component message)
    Sends a feedback message to the player.

    Methods inherited from interface net.minecraft.server.permissions.PermissionSetSupplier

    permissions

    Methods 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

      default @Nullable 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