-2

This question already has an answer here:

On a kitpvp server I manage, players can duel. When they duel each other, they get teleported to a room. I'm having trouble teleporting the player back to spawn after they win. I can do it manually, but I'd rather it be automatic.

marked as duplicate by Dragonrage, Gigazelle, Virusbomb, galacticninja, Joachim Aug 22 at 8:47

This question has been asked before and already has an answer. If those answers do not fully address your question, please ask a new question.

  • As someone who is unfamiliar with KitPvP duels, does the losing player die when defeated? – JonK Aug 17 at 16:19
  • Hi Sen, what have you tried so far? – Joachim Aug 17 at 18:56
  • Well i have tried beds thats about it – TheAncientSen123 Aug 17 at 19:41
1

I did a similar thing back in 1.12 for a small server. The way I did it was to have a command block assign each player to a different team when they start the game (using scoreboards). Then I would have 2 command blocks checking for at least 1 player on those two teams to be in a certain radius. Using gates, once any of the command blocks doesn't detect a player in a team, it runs another command block that teleports the remaining player/players back to a specific location. The players are then removed from the teams. Due to my lack of knowledge of 1.13 commands, I am unable to provide the commands that you could use for this.

I wish you luck

Not the answer you're looking for? Browse other questions tagged or ask your own question.