Gamemode Gamemode is for targeting only players in a specific gamemode. The 4 accepted values are "creative", "survival", "spectator", and "adventure". A "!" can also be used before the gamemode to represent "anything but" Examples:
- "/kill @a[gamemode=creative]" - This will kill all players that are in creative mode. - "/feed @r[gamemode=!creative]" - This will feed a random player who is NOT in creative mode. - "/tp @r[gamemode=sruvivol]" - This will ignore the "gamemode" specifcation and give you an error.
Level Level is for targeting only players with a specific xp level. Accepted values are any integer that is 0 or greater. A "!" can also be used before the level to target any player who does NOT have the specified level. Examples:
- "/kill @a[level=5]" - This will kill all players with 5 bars of xp. - "/feed @r[level=!2]" - This will feed a random player who's xp level is NOT 2. - "/kill @a[level=cat]" - This will ignore the "level" specifcation and give you an error.
Tag Tag is for targeting only players with a specific tag. Accepted values are any string without spaces, you may use qoutes, but they are not required. A "!" can also be used before the tag to target any player who does NOT have the specified tag. Examples:
- "/kill @a[tag="KillMe"]" - This will kill all players with the tag "KillMe". - "/feed @r[tag=!DontFeedMe]" - This will feed a random player who does NOT have the tag "DontFeedMe". - "/kill @a[tag=cool tag]" - This will ignore the "tag" specifcation and give you an error, as it is not allowed to contain spaces. (Tags can't have spaces anyway).
Team Team is for targeting only players only on a specific team. Accepted values are any string without spaces, and preferably a Bukkit team name. A "!" can also be used before the team to target any player who is NOT on the specific team. Examples:
- "/kill @a[team=KillMe]" - This will kill all players on the team "KillMe". - "/feed @r[team=!IDontDeserveFood]" - This will feed a random player who is NOT on the team "IDontDeserveFood". - "/kill @a[team=team name yes]" - This will ignore the "team" specifcation and give you an error, as it is not allowed to contain spaces. (Team names can't have spaces anyway).
Distance Distance is for targeting only players within a specific range. Accepted values are any postive integer. A "!" can also be used before the distance to target any player who is NOT within the range. Examples:
- "/kill @a[distance=10]" - This will kill all players in a 10 block radius (including you). - "/feed @r[distance=!20]" - This will feed a random player who is NOT within a 20 block radius. - "/kill @a[distance=dog]" - This will ignore the "distance" specifcation and give you an error.
Limit limit is for limiting the amount of targets. Accepted values are any positive integer. A "!" can NOT be used here. Examples:
- "/kill @a[limit=2]" - This will kill no more than 2 players. - "/kill @a[limit=rat]" - This will ignore the "limit" specifcation and give you an error.
Chaining together specifications: This specifications can also be used together for multiple different specifications. Any number of them can be used, and if the same specification is used multiple times, it will take the last written one as the value. Examples:
- "/kill @a[distance=10,gamemode=creative]" - Will kill all players within a 10 block radius who is ALSO in creative mode. - "/feed @p[tag=Feedable,distance=!100]" - Will kill the closest player who has the tag "Feedable" and who is not more than 100 blocks away. - "/kill @a[tag=!safe,level=!100,gamemode=!creative,distance=250,limit=5]" - This will kill up to 5 players who does not have the tag "safe" and who is not in creative mode, who's within 250 blocks and who's level is not "100".
All of these tags can be used from players, command blocks, and console*!
IMPORTANT!! Do not use spaces while using specifications, it will not work!Ex. Don't do @a[gamemode = creative, tag= "Rat"]