I need everyone playing the map to be automatically set to adventure mode. How? What is the command?
Unfortunately, there is no real command to set everyone to a gamemode. You would have to have a command block with the command:
And then have all the players hit a button or something to activate the block when they spawn. You could, perhaps, have a spawn room with an iron door, and hook the button to open the door up to a command block.
EDIT: Apparently you can also use
/gamemode 2 @a
To set all players to gamemode 2 (adventure mode).
Or you could have them spawn on a pressure plate which sets them to adventure mode, and then once they leave the spawn (with a command block teleporter), it will set them to survival mode. This isn't really used for an adventure server, but it's a good way to make the spawn grief-proof without having to make it out of bedrock.
You can enter the command:
/gamemode 2 @[m=0,r=X]
X to the radius you want to have people in the adventure mode.
You can also make a second block with the command:
/ gamemode 0 @a[m=2,rm=x+1]
X+1 will switch the players back into the gamemode survival. This would all be connected to a clock or repeating pulser to always check for players. This is a great world guard for servers and adventure maps.