I'm trying to make a cooldown for my custom item's ability and I have tried multiple methods and it has not worked. I want a cooldown that makes you not able to use the ability for 15 seconds, and when you try to use it within that time, it creates an action bar only the user can see and it states that they cannot use the item due to the cooldown. Here is the current code, also let me know if there are any addons I will have to add in order for it to work.
Code:
command /lightningwand <player>:
aliases: lw
usage: &7[&6LW&7] &cWho do you want to give the wand?
permission: lw.give
trigger:
if arg-1 is set:
set {_weapon} to unbreakable iron axe of sharpness 30
give {_weapon} named "&f&lStormbreaker" with lore "&7You are now Thor. This axe has high sharpness and can strike lightning." and "&4&lBEWARE: LIGHTNING STRIKES WILL REMOVE DROPPED ITEMS" and "&5&lMythic" to player
else:
stop
on rightclick:
if player's tool is unbreakable iron axe named "&f&lStormbreaker" with lore "&7You are now Thor. This axe has high sharpness and can strike lightning." and "&4&lBEWARE: LIGHTNING STRIKES WILL REMOVE DROPPED ITEMS" and "&5&lMythic":
strike lightning at the targeted block
else:
stop
Last edited: