1.16.5 spigot can't get the compass to track player?

  • Welcome to skUnity!

    Welcome to skUnity! This is a forum where members of the Skript community can communicate and interact. Skript Resource Creators can post their Resources for all to see and use.

    If you haven't done so already, feel free to join our official Discord server to expand your level of interaction with the comminuty!

    Now, what are you waiting for? Join the community now!

  • LOOKING FOR A VERSION OF SKRIPT?

    You can always check out skUnity Downloads for downloads and any other information about Skript!

Status
Not open for further replies.

tw1sty-

Member
Feb 16, 2021
1
0
1
28
Hi i'm trying to make this manhunt tag script to work and all is fine except the nether. Any reason it would not work there if i'm using spigot 1.16.5?
It shows the message in chat but doesn't set location to compass.

Code:
command /tagspeedrunner <player>:
    description: Sets the selected player as speedrunner.
    usage: &cUsage: /tagspeedrunner <player>
    permission: manhunt.tagspeedrunner
    executable by: players
    aliases: /tsr
    trigger:
        set {speedrunner} to arg 1
        broadcast "&a[TAG MH] &6Tag Manhunt started!"
        broadcast "&a[TAG MH] &c&l%{speedrunner}%&6 is now the speedrunner."
        loop all players:
            loop-player is {speedrunner}:
                loop-player's inventory has compass:
                    remove compass from loop-player's inventory
            else:
                loop-player's inventory doesn't have compass:
                    give 1 compass to loop-player

on right click:
    player is holding compass:
        {speedrunner} is a player:
            player isn't {speedrunner}:
                {speedrunner} is online:
                    world of player is world of {speedrunner}:
                        set the player's compass target to location of {speedrunner}
                        send message "&a[TAG MH] &6Compass pointing at &c&l%{speedrunner}%&6: [&c&l%location of {speedrunner}%&6]"
                    else:
                        set the player's compass target to {last_location}
                        send message "&a[TAG MH] &6Compass pointing at &c&l%{speedrunner}%&6's last know location in this world: [&c&l%location of {speedrunner}%&6]"
                else:
                    send message "&a[TAG MH] &6Cannot locate the speedrunner."
            else:
                send message "&a[TAG MH] &6You are the speedrunner bruv."
        else:
            send message "&a[TAG MH] &6Cannot locate the speedrunner."

on death of player:
    player is {speedrunner}:
        attacker is a player:
            set {speedrunner} to attacker
            broadcast "&a[TAG MH] &c&l%player%&6 died. &c&l%attacker%&6 is now the speedrunner."
        else:
            set {speedrunner} to random element of all players
            broadcast "&a[TAG MH] &c&l%player%&6 died. &c&l%{speedrunner}%&6 was randomly chosen as the new speedrunner."

on death of ender dragon:
    {speedrunner} is a player:
        send title "&c&lSpeedrunner %{speedrunner}% wins!" to all players
        delete {speedrunner}

on respawn:
    {speedrunner} is a player:
        player isn't {speedrunner}:
            wait 1 tick # wait for the player to actually respawn
            give 1 compass to player

on portal:
    player is {speedrunner}:
        set {last_location} to location of player
 
Status
Not open for further replies.