Has Potion Effect (Condition) — Skript

Addon: Skript · Category: Condition · Since: 2.6.1, 2.14 (support for potion effects)

Syntax

%livingentities% (has|have) ([any|a[n]] [active] potion effect[s]|[any|a] potion effect[s] active)

Description

Checks whether an entity has a potion effect with certain properties. An entity is considered having a potion effect if it has a potion effect with at least the specified properties. For example, if an entity has an 'ambient speed 5' effect, they would be considered as having 'speed 5'. For exact comparisons, consider using the <a href='./expressions.html#ExprPotionEffect'>Potion Effect of Entity/Item</a> expression in an 'is' comparison.

Examples

if the player has a potion effect of speed:
	message "You are sonic!"
if all players have speed and haste active:
	broadcast "This server is ready to mine!"

View source