How can I make the compass point to a player?
Solution 1:
I checked, and /setworldspawn
does change the compass immediately. Try running on a clock:
/execute @p[team=hunted] ~ ~ ~ setworldspawn ~ ~ ~
if you encounter any problems, please leave a comment and I will look into it.
Solution 2:
First, a quick note: this command does NOT WORK IN JAVA EDITION.
As of 2020, the best way to do this is with a repeating command block set to always active and with this command set in it: /execute [insert prey gamertag] ~ ~ ~ setworldspawn ~ ~ ~
.
This will work, but you need to do 2 quick things in order for it to work 100% of the time. First, give the command /gamerule commandblockoutput false
so that chat isn't constantly filled saying the spawnpoint was changed. Second, you need to set a ticking area around the command block. You'll need the coordinates for this. You need to use /tickingarea add [insert coordinates] [insert coordinates]
. The ticking area must be the 3x3 area around the command block, with the command block in the center. Now just make sure the hunter has a large supply of compasses and set their personal spawnpoint near the command block to prevent them from respawning on top of you. Enjoy!