Updated:
1. Spawn players in the lobby
/setworldspawn 0 100 0
/gamerule minecraft:respawn_radius 0
The second line stops spawn positions spreading out. In 1.21.10 and earlier use spawnRadius. See the spawnpoint command.
2. Stop block breaking
In a repeating, always active command block:
/gamemode adventure @a[distance=..30,gamemode=survival]
Survival players within 30 blocks switch to adventure mode and cannot break or place blocks. Switch them back with the exit warp.
3. No damage or hunger
/effect give @a[distance=..30] minecraft:resistance 2 4 true
/effect give @a[distance=..30] minecraft:saturation 2 0 true
4. Always day and clear
/time set day
/weather clear
/gamerule minecraft:advance_time false
/gamerule minecraft:advance_weather false
In 1.21.10 and earlier the rules are doDaylightCycle and doWeatherCycle. This affects the whole world.
5. Warp buttons
/tp @p 200 64 0 90 0
Put this in an impulse command block next to a button. See the tp command.
6. Floating welcome sign
/summon text_display 0 102 5 {text:{text:"Welcome!\nPress a button to play",color:"gold"},billboard:"center"}
See floating text. For signs on walls, see the sign command.
Troubleshooting
- Players spawn elsewhere: beds override the world spawn.
- Blocks still break: only survival players are switched; test with one.
- Time keeps moving: use the gamerule name for your version.
Check your command
The Command Error Doctor checks common syntax mistakes in your browser.