I know [r=x] is to make a radius and you can do /tp @a[r=30] x y z to teleport someone everyone 30 blocks away but how can I do it so it excludes me? So let's say that me and two other people are standing 10 blocks away from the command block, how could I make it that it teleports everyone else apart from me?

1 Answer 1


Just add name=!YOUR NAME to the selector. So if your username is Chickenator, you should do:

/tp @a[r=30,name=!Chickenator] x y z

The ! excludes or negates the selection value. You can also exclude teams, using team=!TEAM, for example if you want to exclude all staff (OP players), you can put them in a team and exclude that team. Another use for the !, is type=!ENTITY TYPE, for example, type=!Cow, to exclude cows.

  • Works great! I can also use @e instead of @a to quickly get rid of any mobs :D Jul 6, 2015 at 19:23
  • @Chickenator Glad it helped you :D Jul 7, 2015 at 5:29

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .