top of page

Selectors

This tutorial will teach you about selectors. Selectors are the @p

@a @r @e @s. Each one has a different purpose. @p selects the nearest player. @a selects all players. @r selects a random player. @e selects all entities. We will talk about @s in the execute page.

That is not all selectors can do!

Selectors can be restricted. For example say you only want to execute on pigs. Then you would use @e[type=pig]. You can specify any entity after the equal sign.

 

What else can you do you may ask? You can specify a radius. Within 5 blocks of you? @e[distance=..5]. Atleast 5 blocks away from you? @e[distance=5..]. Exactly 5 blocks away from you? @e[distance=5]. From 5 to 10 blocks away from you? @e[distance=5..10]. This may seem arbitrary but the way it works is you specify either a range or a value. You specify the range as "x..y". If you leave one value out it will assume the lowest or highest value depending on which one you left out. Hope I explained it good.

​

What if I want a select custom named mobs? I got you too. Use @e[name=YOUR_NAME_HERE].

 

What about tagged mobs? I got you too. Use @e[tag=YOUR_TAG_HERE].

​

What about scoreboards? I got you too. Scoreboard do use the same ranges as distance which I already covered. Use @e[scores={YOUR_SCOREBOARD_HERE=5..10}]. This one may seem more complicated but it also allows you to use more than one. Example @e[scores={elevator_status=2..5,fridge_status=0..2}]. And this is not a hint to a future fridge command.

​

Scoreboards and tags section on the bottom of the page.

​

If you have anything I have not listed here message me using the sites inbuilt message system. I will update it and then use google. If you could not find anything on google then you will have to wait till I update the website, sorry for any inconvenience.

​

What if I want more than one tag? Well you link them together using a comma. Example @e[type=pig,tag=special].

bottom of page