Is there a quicker alternative for the [name=!] command?
I’m trying to make a multiplayer mini-game map. The solo player can activate command blocks to give harmful effects to everyone but themself. I’m using the [name=!] command, but I was wondering if there was something more efficient? If the roles of players were to rotate, say, if someone new became the solo player, is there a better way than re-inputting the new player’s name every time? Or am I stuck using the command I already use? Apologies if this was confusing.
Solution 1:
You could use tags, or this command: effect @a[c=!1] poison 100 1
The c=
means closest players, so c=2
is the closest 2 players, and c=!1
means not the closest one player.