Potion Effect of Entity/Item (Expression) — Skript

Addon: Skript · Category: Expression · Since: 2.14

Syntax

[the] [active|hidden|(active and hidden|hidden and active)] %potioneffecttypes% [potion] effect[s] of %livingentities/itemtypes%

Description

An expression to obtain a specific potion effect type 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.

Examples

set {_effect} to the player's active speed effect
add 10 seconds to the player's slowness effect
clear the player's hidden strength effects
reset the player's weakness effects
delete the player's active jump boost effect

View source