How to track a specific player with compasses in Minecraft 1.15 Java Edition

I have seen the videos of Dream and GeorgeNotFound filming a Minecraft hunting event. I want to replicate this but I am not sure how to create a tracking device in Java Edition. I want to know how I can do this with command blocks but I'm not very good at it.


Solution 1:

Here are the commands:

Repeating Command Block: execute at <SPEEDURNNER> run setworldspawn ~ ~ ~

Repeating Command Block: spawnpoint <HUNTER> (COORDS FOR HUNTER TO RESPAWN)

It doesn't matter where you put these command blocks, it just matters that they are on "Always Active".