Skip to content

Prefixes

moxvallix edited this page Mar 28, 2022 · 2 revisions

Prefixes are appended before another tag, followed by a plus symbol (+).
Only one prefix per tag, as prefix stacking is not implemented, although it may be in the future.

Supported distances: 1, 2, 3, 4, 8, 16, 32, 64

Max Distance Selector

This prefix determines the maximum distance a player can be from the tagged entity (@t) for the tag to take effect. This prefix uses the format "..%n", where %n is a supported distance.

Example:
/tag @t add effects
/tag @t add ..8+glowing
This tag will make the entity (@t) have glowing if a player is within 8 blocks of it.

Min Distance Selector

This prefix determines the minimum distance a player should be from the tagged entity (@t) for the tag to take effect. This prefix uses the format "%n..", where %n is a supported distance.

Example:
/tag @t add effects-extra
/tag @t add 16..+poison-2
This tag will make the entity (@t) have poison 2 as long as there are no players within 16 blocks of it.

Clone this wiki locally