Minecraft Wiki

The Minecraft Wiki is no longer considered as official by Microsoft and therefore several changes are required to be made, including to the wiki's logo. Please read this announcement for more information.

READ MORE

Minecraft Wiki
Advertisement
Information icon.svg
This feature is exclusive to Bedrock Edition and Education Edition. 
querytarget
Visibility

Hidden

Permission level
required

2‌[BE only]
0‌[EE only]

Restrictions

No command blocks

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

Advertisement