Updated:
1. Make the teams (once)
/team add seekers "Seekers"
/team modify seekers color red
/team add hiders "Hiders"
/team modify hiders nametagVisibility never
/scoreboard objectives add timer dummy
/bossbar add minecraft:hideseek "Time left"
Player name tags normally show through walls. nametagVisibility never hides the hiders' names. More in the team guide.
2. Put players on teams
/team join seekers Steve
/team join hiders @a[team=]
The first line picks the seeker (replace Steve). The second puts everyone without a team on the hiders. For a random seeker, run /team join seekers @r first.
3. Start
/gamemode adventure @a
/effect give @a[team=seekers] minecraft:blindness 30 0 true
/effect give @a[team=seekers] minecraft:slowness 30 6 true
/scoreboard players set #game timer 6000
/bossbar set minecraft:hideseek max 6000
/bossbar set minecraft:hideseek players @a
The seeker is blinded and slowed for 30 seconds while everyone hides. Adventure mode stops anyone digging through walls. 6000 is 5 minutes (20 per second).
4. Count down and show the timer
Put these in a repeating command block (Always Active) followed by chain command blocks:
/execute if score #game timer matches 1.. run scoreboard players remove #game timer 1
/execute store result bossbar minecraft:hideseek value run scoreboard players get #game timer
/execute if score #game timer matches 1200 run effect give @a[team=hiders] minecraft:glowing 60 0 true
/execute if score #game timer matches 1 run title @a title {"text":"Time's up!","color":"gold"}
The timer drops by 1 each tick and the boss bar follows it. With one minute left (1200), hiders start glowing through walls. See the bossbar guide and glowing guide.
5. Found players
/gamemode spectator Alex
/team join seekers Alex
Switch found players to spectator, or move them to the seekers so they help search.
6. Clean up
/bossbar set minecraft:hideseek players
/effect clear @a
/team leave @a
/gamemode survival @a
This hides the boss bar and resets effects and teams. To play again, start from step 2.
When it does not work
- Names still show through walls: check the hiders are on the team with
/team list hiders. - No boss bar: you skipped
players @a. - The timer does not move: check the repeating block is Always Active and the chain points the right way (command block tutorial).
- The seeker can still move: jumping still works; ask them to wait in a closed start room.
Check your command
The Command Error Doctor checks common syntax mistakes in your browser.