Hi i run a small server with custom items and ive been trying to find a better way to to do this. At the moment i use loop to add effects to my items but its not ideal as its just adding the effect for 2 seconds all the time. here is an example of one of my scripts:
I would like it if the effects would last indefinetly but only with the the piece of armour on and remove it when it is not equipped. I hope someone much smarter than i am can help me out with this! Thanks!
- every 2 seconds:
- loop all players:
- #If the player we check is wearing a Gold helmet of Blast protection 5 and fire protection 3 and unbreaking 8 named "&c&lMiner's Helm" with the lore "&dThe Light Will Show The Way" and "&a-Gives Night Vision" and "&a-Ultra Durable"
- if loop-player is wearing Gold helmet of Blast protection 5 and fire protection 3 and unbreaking 8 named "&c&lMiner's Helm" with lore "&dThe Light Will Show The Way" and "&a-Gives Night Vision" and "&a-Ultra Durable":
- #then apply the Night vision 1 effect to that player for 2.5 seconds
- apply Night vision to the loop-player for 2.5 seconds
I would like it if the effects would last indefinetly but only with the the piece of armour on and remove it when it is not equipped. I hope someone much smarter than i am can help me out with this! Thanks!