I need a way to apply a potion effect while a player is wearing/holding an item.
The issue I am having is the effect in skript stacks the time so if a player has 1 second left on their potion, and then you apply potion effect for 1 second. It actually applies for two seconds. This means if the player wears the item for a long time, this leftover time builds up.
Essentially what I'm looking for is a way to "Update" the time left on the potion every second. E.g.
Set duration of potion effect on player to 1 second.
I tried using the /effect command but it seems very inefficient to me to be using it every second on however many players are wearing an item.
The issue I am having is the effect in skript stacks the time so if a player has 1 second left on their potion, and then you apply potion effect for 1 second. It actually applies for two seconds. This means if the player wears the item for a long time, this leftover time builds up.
Essentially what I'm looking for is a way to "Update" the time left on the potion every second. E.g.
Set duration of potion effect on player to 1 second.
I tried using the /effect command but it seems very inefficient to me to be using it every second on however many players are wearing an item.