Minecraft Target Selector Builder

Build complex target selectors for Minecraft commands

Generated Selector

@p
Example:/kill @p/give @p diamond

Selector Type

Origin Point (x, y, z)

Volume (dx, dy, dz)

Quick Reference

Selector Types

  • @p - Nearest player
  • @a - All players
  • @r - Random player
  • @e - All entities
  • @s - Executing entity

Examples

  • @a[gamemode=survival]
  • @e[type=zombie,limit=10]
  • @p[distance=..5]
  • @e[type=!player]

How to Use the Minecraft Target Selector Builder

Target selectors are a fundamental part of Minecraft commands, allowing you to specify which players or entities a command affects. Our builder generates valid selector syntax for Java Edition 1.13+ with all available arguments including position, distance, scores, NBT data, and entity filtering. No need to memorize the syntax.

Step 1: Choose a Selector Type

Start by selecting the base selector: @p for nearest player, @a for all players, @r for random player, @e for all entities, or @s for the executing entity. Each type has different default sorting and behavior.

Step 2: Add Filters and Conditions

Use the tabs to add arguments. The Position tab sets origin and volume. Distance restricts by range and rotation. Entity filters by type, name, and tag. Player filters by gamemode, level, and team. Scores checks scoreboard values.

Step 3: Copy and Use in Commands

The generated selector updates in real time at the top of the page. Click the copy button and paste it into any Minecraft command like /kill, /give, /effect, or /teleport. Use it in command blocks, datapacks, or server console.

Frequently Asked Questions

What is a target selector in Minecraft?

A target selector is a string like @p, @a, @e, @r, or @s that specifies which entities a command targets. You can add arguments in square brackets like @e[type=zombie,distance=..10] to filter entities by type, distance, position, scores, NBT data, and more.

What is the difference between @p and @a?

@p targets only the nearest player, while @a targets all players in the world. @p is useful for single-target commands, while @a applies effects to everyone. Both accept additional filter arguments to narrow the selection.

How do I exclude entities with the ! operator?

Prefix a filter value with ! to negate it. For example, type=!player targets all entities except players, and gamemode=!creative targets all players not in creative mode. Check the 'Exclude' checkbox next to each filter in our builder.

Can I use target selectors in command blocks?

Yes, target selectors work in chat commands, command blocks, functions, and datapacks. In command blocks, @p refers to the nearest player to the command block, and @s refers to the entity that activated it. They are essential for automation and map making.

Related Minecraft Tools

Run Custom Commands on Your Own Server

Set up command blocks, datapacks, and automated systems on a dedicated Minecraft server. Full operator access with reliable performance.

View Hosting Plans