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.
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