Hello, I need help
the script checks the player head without a name because the script my command "player head named "&b&lTeleporthome" is ignored.
but I'm facing the problem that if the player has a player head without a name in the inventory, nothing happens and it doesn't even send the message "&3&l[HOME] &cYou don't have a Teleporthome." can it be fixed somehow?
the script checks the player head without a name because the script my command "player head named "&b&lTeleporthome" is ignored.
but I'm facing the problem that if the player has a player head without a name in the inventory, nothing happens and it doesn't even send the message "&3&l[HOME] &cYou don't have a Teleporthome." can it be fixed somehow?
Code:
command /home:
executable by: players
trigger:
if {homes%uuid of player%} is not set:
message "&3&l[HOME] &bYou have no set home!"
else if player has an player head:
loop all items in player's inventory:
name of loop-value is "&b&lTeleporthome"
message "&3&l[HOME] &bYou will be teleported in 3 seconds"
wait 60 ticks
teleport player to {homes%uuid of player%}
remove 1 of loop-value from player
send "&3&l[HOME] &bYou were teleported home and the teleport was destroyed." to player
play sound "entity.enderman.teleport" at player
stop
else:
send "&3&l[HOME] &cYou don't have a Teleporthome." to player