Filter (Expression) — Skript

Addon: Skript · Category: Expression · Since: 2.2-dev36, 2.10 (parenthesis pattern)

Syntax

%objects% (where|that match) \[<.+>\]

Description

Filters a list based on a condition. For example, if you ran 'broadcast "something" and "something else" where [string input is "something"]', only "something" would be broadcast as it is the only string that matched the condition.

Examples

send "congrats on being staff!" to all players where [player input has permission "staff"]
loop (all blocks in radius 5 of player) where [block input is not air]:

View source