Potion Effects of Entity/Item (Expression) — Skript
Addon: Skript · Category: Expression · Since: 2.5.2, 2.14 (active/hidden support, more change modes)
Syntax
[the] [active|hidden|(active and hidden|hidden and active)] potion effects of %livingentities/itemtypes%Description
An expression to obtain the active or hidden potion effects of an entity or item. When an entity is affected by a potion effect but already has a weaker version of that effect type, the weaker version becomes hidden. If the weaker version has a longer duration, it returns after the stronger version expires. NOTE: Hidden effects are not able to be changed. NOTE: Clearing the base potion effects of a potion item is not possible. If you wish to do so, just set the item to a water bottle.
Examples
set {_effects::*} to the active potion effects of the player
clear the player's hidden potion effects
add the potion effects of the player to the potion effects of the player's tool
reset the potion effects of the player's tool
remove speed and night vision from the potion effects of the player