17
In this tutorial I show you how to use selectors.
This is useful if you want to give an item only to people in team red, or kill everything except for yourself.
Examples:
/kill @a
Kills every player.
/kill @p
Kills the nearest player.
/kill @r
Kills a random player.
/kill @e
Kills all entities. (This includes not only mobs and players, but also armor stands and item frames.)
/kill @e[]
Kills only certain entities.
/kill @e[type=Creeper]
Kills all creepers.
/kill @e[name=Bomby]
Kills every entity named Bomby.
/kill @e[type=Creeper,name=Bomby]
Kills every creeper called Bomby.
/kill @e[type=!Player]
Kills every entity that is not a player.
/kill @a[team=red]
Kills everyone in team red.
/kill @a[team=!red]
Kills everyone that is not in team red.
/kill @a[score_Tutorial_min=1]
Kills everyone with a minimum score of 1 for objective Tutorial.
/kill @a[score_Tutorial=1]
Kills everyone with a maximum score of 1 for objective Tutorial.
/kill @a[score_Tutorial=1,score_Tutorial_min=1]
Kills everyone with a score of 1 for objective Tutorial.
This is useful if you want to give an item only to people in team red, or kill everything except for yourself.
Examples:
/kill @a
Kills every player.
/kill @p
Kills the nearest player.
/kill @r
Kills a random player.
/kill @e
Kills all entities. (This includes not only mobs and players, but also armor stands and item frames.)
/kill @e[]
Kills only certain entities.
/kill @e[type=Creeper]
Kills all creepers.
/kill @e[name=Bomby]
Kills every entity named Bomby.
/kill @e[type=Creeper,name=Bomby]
Kills every creeper called Bomby.
/kill @e[type=!Player]
Kills every entity that is not a player.
/kill @a[team=red]
Kills everyone in team red.
/kill @a[team=!red]
Kills everyone that is not in team red.
/kill @a[score_Tutorial_min=1]
Kills everyone with a minimum score of 1 for objective Tutorial.
/kill @a[score_Tutorial=1]
Kills everyone with a maximum score of 1 for objective Tutorial.
/kill @a[score_Tutorial=1,score_Tutorial_min=1]
Kills everyone with a score of 1 for objective Tutorial.
Tags |
tools/tracking
3348978
6
how-do-selectors-work
Create an account or sign in to comment.
/execute @p[score_OpenDoor_min=0,max=0] ~ ~ ~ /say hi
If i have a score of 2 it still says hi and i want it to run only if a player has a score of 0
there's no such thing as max=0. score_OBJECTIVE= is essentially a maximum.