I think there is a way to do an inside radius, and an outside radius, but how? I want to have a spawnpoint, where @a[r=30] is in gamemode a, and everyone outside is gamemode s. How would I write this?
1 Answer
Use the rm
(Radius minimum) argument. For example:
/gamemode @a[rm=30] s
In 1.13 the commands are:
gamemode @a[distance=..30] adventure
gamemode @a[distance=30..] survival
-
I knew it was something simple, but I guess it was so simple I couldn't find a YT video on it... :) Commented Nov 25, 2015 at 13:41
-
Remark: Tagging the players who go in and out and only setting their gamemode once improves performance and causes prevents output spam if commandBlockFeedback is on. Commented Jan 5, 2019 at 11:13