I am helping my friend build a minigame server, in which there is a stage in lobby and a door in the stage (I dunno maybe the idea will change) that opens when the game is about to start, then closes when it is going to start and then the floor in that room will open up and all the people will fall into darkness aka black concrete and once they enter that area they will teleport to a certain minigame, a different one each time it happens, and once it's done do it again with a different minigame (use a similar red stone circuit except other command blocks to teleport players to different places).
I didn’t know how to make it so it teleports you to a different minigame every time or in an order, but then I remembered a tutorial I had seen. It was Eystreem's security camera no mod tutorial which would have been really helpful if the /testfor command hadn't been removed from Minecraft Java Edition with the 1.13 update (it was a bedrock tutorial) and if the radius entity tag had worked.
I tried command blocks in the area before realising it had to be a different minigame each time.
At this point I was really stuck and the only thing I could do was ask for a command, redstone thing or paper/spigot/bukkit plugin on the SpigotMC forums and the Minecraft forums.
Any help in Minecraft paper 1.18.1 would be greatly appreciated, thank you in advance!