I want to use the command block to set the nearest player's spawn to a specific location, how to I do it? And will the player spawn there if he dies?
04 Answers
You can do /setspawn @p 50 64 50. @p targets the nearest player, and 50 64 50 is the x,y and z coordinates. If the set player dies they will respawn at the set coordinates.
/setspawn @p in the command block to set the spawn. But you need to be in opped creative to make it work.
What you would do is set a team spawn, this can be done by using this:
[c1]=*****=[c2]
(c1 = /scoreboard teams join (Team) @p )
(c2 = /setspawn @a[team=(Team)] x y z)
(=) = Repetor
(*) = Redstone
Use /tp @p [x] [y] [z] This will teleport the nearest player to a specific location.