On my small private server, I have created special armor which when all pieces are equipped, the player is given a potion effect. One of my player's found that if you spam click the armor with just your mouse it registers as putting armor on without taking it off, and if you spam click with an item it registers the armor as it being taken off without it being put on. This is an issue as it could make it possible to recieve the potion effect without actually wearing the armor.
code_language.skript:
on armor equip:
if lore of event-item contains "&b&l&nReinforced":
add 1 to {resistance.%player%}
send "&b&n%{resistance.%player%}%/4 Pieces Equipped!"
if {resistance.%player%} is 4:
apply resistance tier 1 to player for 99 days ambient true
stop
on armor unequip:
if lore of event-item contains "&b&l&nReinforced":
remove 1 from {resistance.%player%}
send "&b&n%{resistance.%player%}%/4 Pieces Equipped!"
remove resistance from player