Skip to content
WikilyWIKILY
All games23 Wikis · pick your game
CalculatorsTarget selectors

Switch game

23 Wikis · pick your game
Target Selector Builder

Calculator

Target Selector Builder

Build a target selector with every option the game has and see what each part picks, in the game's own words.

Who
Distance to entity

Tags, separated by commas; ! in front means without it.

More options
Experience level
Entity's x rotation
Entity's y rotation
Entities with scores

What it picks

@a
Every player

Selector

@a

2 characters

For Java Edition 26.3. Every form this tool writes was run through the game's own command parser.

Selector variables

@pThe nearest player1
@aEvery playerAll
@rA random player1
@sThe entity running the command1
@eEvery entityAll
@nThe nearest entity1

Options

typeEntities of type
nameEntity name
tagEntities with tag
teamEntities on team
distanceDistance to entity
levelExperience level
xx position
yy position
zz position
dxEntities between x and x + dx
dyEntities between y and y + dy
dzEntities between z and z + dz
x_rotationEntity's x rotation
y_rotationEntity's y rotation
gamemodePlayers with game mode
scoresEntities with scores
limitMaximum number of entities to return
sortSort the entities
nbtEntities with NBT
predicateCustom predicate
advancementsPlayers with advancements

How the game works it out

RangesWritten min..max; either end can be left out, like ..10 or 5..
Not! in front of a value means the opposite, like type=!player or tag=!afk
limit and sortNot with @s, which is always the one entity running the command
typeNot needed with @a, @p and @r, which only pick players
Players onlyCommands like /tellraw and /title refuse @e and @n unless they say type=player, a game mode or a level
Join the creator communityThe people who build the Minecraft Java Edition wiki are on our Discord. Ask questions or suggest pages.Join Discord (opens Discord in a new tab)