Commands/querytarget

Minecraft Wiki article. Categories: Bedrock_Edition, Minecraft_Education, Commands

📌 Mirrored from Minecraft Wiki

This article is reproduced from Commands/querytarget on the Minecraft Wiki. Mirrored from revision 3589487. It is licensed CC BY-NC-SA 3.0 by the Minecraft Wiki contributors — not under the Codex’s CC BY-SA 4.0, and it may not be used commercially. Edits belong upstream, not here.

This feature is exclusive to Bedrock Edition and Minecraft Education.
 
/querytarget

Gets transform, name, and id information about the given target entity or entities.

Syntax

querytarget <victim: target>

Arguments

victim: target

Specifies the targets. Must be one or more player names and/or target selectors separated by spaces (@e is permitted to target entities other than players).

Result

Fails if ...

On success,command block: comparator output

Sources