Updated:
1. Setup (once)
/gamerule keep_inventory true
/gamerule immediate_respawn true
/spawnpoint @a 0 200 0
Use keepInventory and doImmediateRespawn on 1.21.10 and earlier and on Bedrock.
2. Next stage on landing (repeating)
/execute as @a at @s if block ~ ~ ~ water if entity @s[x=-10,y=100,z=-10,dx=20,dy=10,dz=20] run tp @s 100 200 0
Add one line per stage with its own area and destination.
3. Checkpoints
/execute as @a at @s if block ~ ~ ~ water if entity @s[x=-10,y=100,z=-10,dx=20,dy=10,dz=20] run spawnpoint @s 100 200 0
Run this before step 2. See the spawnpoint command.
4. Announce a clear
/execute as @a at @s if block ~ ~ ~ water if entity @s[x=190,y=100,z=-10,dx=20,dy=10,dz=20] run tellraw @a [{"selector":"@s"},{"text":" cleared the dropper!","color":"gold"}]
5. Timer (Java)
/scoreboard objectives add time dummy "Time"
/scoreboard players add @a[tag=playing] time 1
Run the first line once and the second in a repeating command block. Give players the playing tag with /tag @a add playing when they start, and remove it in the clear command from step 4 so their time stops. The score counts ticks, so divide by 20 for seconds. Same timer as the parkour course.
Troubleshooting
- No advance: check the area covers the water.
- Sent back a stage: the checkpoint must run before the teleport.
- Bedrock: steps 2 to 4 work as written.
Check your command
The Command Error Doctor checks common syntax mistakes in your browser.