i need a help with my /home command. i want to it charge 5 coins. It teleports you if you enough, but it doesn't remove the coins.
here's the code:
here's the code:
Code:
command /home:
description: Teleport yourself to your home
trigger:
if {home.%player%} is not set:
play sound "block.note_block.bass" to player
message "&cYou have not set your home yet!"
stop
if player has 5 gold nuggets named "&6&l&oCoin":
teleport player to {home.%player%}
play sound "entity.experience_orb.pickup" to player
remove 5 gold nugget named "&6&l&Coin" from player's inventory
else:
message "&cYou don't have enough coins!"
play sound "block.note_block.bass" to player