How can I make this checkpoint system work in multiplayer? Minecraft 1.9
I have a checkpoint system in Minecraft 1.9 that detects a when a player is standing on a certain block, and then summons an armorstand where they are. If they step on a different kind of block, it teleports the player back to the armorstand. The problem is that this only works in single player. If there are 2 players, they will both keep setting checkpoints for each other, and it will become chaotic pretty fast. How can I make this work in multiplayer? PS: I have already tried naming armorstands after players, but you can't put selectors in the customname tag. I tried using scoreboards also, but I'm not so clear on how to use them, so I'm not sure if I'm going about it in the right way.
Best Answer
For silent checkpoints use these commands
/execute @r[type=armor_stand] ~ ~ ~ /spawnpoint @a[type=player,r=1]
/execute @r[type=armor_stand,name=NAME] ~ ~ ~ /spawnpoint @a[type=player,r=1]
Have the first command running at all times in your world and when a player goes in a armor_stand (that you can make invisible) then it will set their spawnpoint at the last point they touched the armor_stand ( The edge of its hitbox). If you are making a parkour map where you jump on thin platforms then put the armor_stand on the closest edge of the block where you are jumping from and it will set their spawn on the "checkpoint block". You can name the armor_stand(The name is invisible) but use the second command. This is a multiplayer friendly checkpoint system that is tested and will work for all of your checkpoints. But the more checkpoints you have the slower it is but you can have more of this command running to speed it back up. 1 command(At full speed = 10 checkpoints.
Pictures about "How can I make this checkpoint system work in multiplayer? Minecraft 1.9"



How do you set checkpoints in Minecraft?
The tilde ~ coordinate is relative to the player's current world location. So if I teleport a player to ~ ~1 ~, then they will be teleported 1 block up from their current position. Using the carrot ^ will be relative to the current local direction of the player.How do you make checkpoints in Minecraft Parkour?
Introduced in 1.13, the caret notation ^ denotes the direction relative to the player's head rotation. Like the tilde notation ~ , it can be used in any command that supports relative coordinates.Basic Checkpoint-System to go! (Minecraft 1.9 | DE)
More answers regarding how can I make this checkpoint system work in multiplayer? Minecraft 1.9
Answer 2
If you want the checkpoint to make a "ding" sound when you step on it just once then use these commands. Command 1 & 2 Only Need to be used Once, while 3, 4 & 5 always need to be running. 6 is a optional command that you should only use if you the players to see what checkpoint their on.
/scoreboard objective add CheckPoint dummy
/scoreboard players add [name] CheckPoint 0
execute @r[type=armor_stand,name=ARMORSTANDNAME] ~ ~ ~ /spawnpoint @a[type=player,r=1]
playsound minecraft:entity.experience_orb.pickup neutral @a[score_dummy=0] ~ ~ ~ 300
scoreboard players add @a CheckPoint 1
Optional 6. scoreboard objective setdisplay sidebar CheckPoint
For Each Checkpoint like this you a named armorstand (differant for each checkpoint) and in command #4 you need to change the "0" to the checkpoint your on (0 = checkpoint 1).
Sources: Stack Exchange - This article follows the attribution requirements of Stack Exchange and is licensed under CC BY-SA 3.0.
Images: Anete Lusina, Pixabay, Sharad Bhat, Ylanite Koppens
