Another way of doing it is to use teams. So, say, /scoreboard teams add staff.
Then you add your players: /scoreboard teams join staff player1 and /scoreboard teams join staff player2.
After that just use: /gamemode adventure @a[team=!staff]
I personally prefer the latter option because it makes it easier to remember. One tag on a random player can easily be overlooked, but /scoreboard teams list will make it very clear what is going on in your map.
I like this solution. My goal is to give players a sandbox area of survival. I already named my areas LOT1, LOT2, ... so I just need to add players to the appropriate team.
At the center of a lot I will do the following in command blocks:
Thanks for the commands unfortunately still not getting them to work I have made both of the team's team (lot1) and (lot2) tested them both and they're coming up with no players found. joined lot1 btw I'm not a complete moron but i'm defiantly doing something wrong.
I Hi!
I want to exclude 2 players from a gamemode change but I only found how to to do it with one player
This works for 1 player:
/gamemode adventure @a[m=0,r=200,name=!playername1]
How do we do this and to exclude playername1 and playername2?
This does NOT work, it takes the last name and ignore the first.
/gamemode adventure @a[m=0,r=200,name=!playername1,name=!playername2]
This returns a syntax error: (is there an "and" argument?)
/gamemode adventure @a[m=0,r=200,name=!playername1,!playername2]
Goal:
I have define a survival zone for 2 players, but I want to make sure everyone else is force to adventure when entering the zone to avoid grief.
Possible workaround: A gamemode change wall?
Is there a way to code the following command using wall area instead of a sphere area:
/gamemode adventure @a[m=0,r=10]
Something with x,y,z,dx,dy,dz maybe?
Lets say I want to make a 1 wide x 50 tall x 50 long area north of the command block position?
Looks like my workaround solution works
This creates a rectangle shape area north of the command block and change the gamemode of a player passing throw it:
/gamemode adventure @a[x=~,y=~,z=~,dx=5,dy=50,dz=-50]
I like this solution. My goal is to give players a sandbox area of survival. I already named my areas LOT1, LOT2, ... so I just need to add players to the appropriate team.
At the center of a lot I will do the following in command blocks:
/gamemode survival @a[m=2,r=100,team=lot1]
/gamemode adventure @a[m=0,r=100,team=!lot1]
Thanks!
I will test it.
This No longer works in 1.13 Does any one know the commands for 1.13???
/gamemode survival @a[gamemode=adventure,distance=..100,team=lot1]
/gamemode adventure @a[gamemode=survival,distance=..100,team=!lot1]
==Links==
๐๐๐๐จ๐ง๐ ๐๐ก๐๐ง๐ง๐๐ฅ- https://www.youtube.com/channel/UCQYroXqdZtYBnyspneetBGA/featured
๐๐ง๐ฌ๐ญ๐๐ ๐ซ๐๐ฆ- https://www.instagram.com/cowsdabest_yt/?hl=en
๐๐ฐ๐ข๐ญ๐ญ๐๐ซ- https://twitter.com/cowsdabestyt
๐๐ข๐ฌ๐๐จ๐ซ๐- https://discord.gg/H2NfhpQ
==DISCLAIMER!==
Please credit me if you are going to use it in a video or a map!
Thanks for the commands unfortunately still not getting them to work I have made both of the team's team (lot1) and (lot2) tested them both and they're coming up with no players found. joined lot1 btw I'm not a complete moron but i'm defiantly doing something wrong.
Never Mind Spoke to soon had the game modes the wrong way around haha