Is there a way to make a repeating command block not apply its command to server operators? [duplicate]
I am trying to make a radius that players are turned into adventure mode, but when they leave they get turned back into survival, the part I cannot figure out is how to make it so server operators are not affected by this (and/or a list of players too).
These are the commands that I have in 2 separate repeating command blocks:
/gamemode survival @a[distance=30..]
/gamemode adventure @a[distance=..28]
Solution 1:
You are going to want to tag all players who are op with tag <name> add op
. Then, those two commands can be gamemode survival @a[distance=30..,tag=!op]
and gamemode adventure @a[distance=..28,tag=!op]
. tag=!op
will affect all players who are not tagged with the tag "op".