Respawn dynamics of command blocks in a Minecraft event

Respawn dynamics of command blocks in a Minecraft event - White Metal High-rise Viewing Deck Building

I'm designing a parkour event in a Vanilla world totally organized with command blocks.
What I'm trying to do is:

  1. Teleport a player in a indoor map in the sky
  2. Change his gamemode to Adventure Mod
  3. Set his spawn-point at the beginning of the map
  4. Let him continue the event
  5. At the end of the event teleport him back
  6. Change his gamemode to Survival
  7. Reset his old spawn-point

Well, I can do everything in this list, except for the point 7..
How can I reset his old spawn-point?



Best Answer

What I would do:

Don't set their spawn in the sky, instead make a deathCount objective, and at the beginning of the 'event', set it to 0 for all players. When a player dies, teleport them back to the beginning, then set their deathCount to 0.

If you are doing a single player map, you could, instead of using beds for spawns, have a button that summons an invisible invincible armor stand, and then use that for the 'resetting' part.

If you are doing this with multiple people on a server, you could also at the beginning of the event, kill all players, then summon an armor stand at each player with a custom name, then use those to set the spawns back.

How to use /scoreboard

First, make the objective:

/scoreboard objectives add abc deathCount  

Then, make a clock going to two command blocks.
In the first block, put

/tp @a[score_abc_min=1] <x> <y> <z> (coords of intended spawn)  

The second block should have

/scoreboard players set @a abc 0  

abc can be replaced with whatever you want

New answser:

Use a command block close to the middle of the room, (could be on roof or in floor) on a relatively quick timer. Use /tp @a[rm=?] <x> <y> <z> to teleport everyone at least ? blocks from the command block to x y z.




Pictures about "Respawn dynamics of command blocks in a Minecraft event"

Respawn dynamics of command blocks in a Minecraft event - Crop unrecognizable artists in white costumes dancing on street during festival on sunny day
Respawn dynamics of command blocks in a Minecraft event - Male standing against glowing fire lights during night show
Respawn dynamics of command blocks in a Minecraft event - Back view of unrecognizable trendy groom catching up bride in white dress on ridge with snow on wedding day



Quick Answer about "Respawn dynamics of command blocks in a Minecraft event"

  • Teleport a player in a indoor map in the sky.
  • Change his gamemode to Adventure Mod.
  • Set his spawn-point at the beginning of the map.
  • Let him continue the event.
  • At the end of the event teleport him back.
  • Change his gamemode to Survival.
  • Reset his old spawn-point.


What is the Respawn command in Minecraft?

This command allows you to prepare some events to happen in your minecraft world. Time should be a game tick,for example game tick 1 is when the sun rises.

How do you Respawn a command block?

A repeat command block executes its command once every one game tick (or more\u200c [BEonly]) until no longer activated.



357,000 COMMAND BLOCKS in ONE MINECRAFT MAP?!




Sources: Stack Exchange - This article follows the attribution requirements of Stack Exchange and is licensed under CC BY-SA 3.0.

Images: Pixabay, Julia Volk, Keith Lobo, Dmitriy Ganin