Whether (Expression) — Skript

Addon: Skript · Category: Expression · Since: 2.9.0, 2.17 (changing)

Syntax

whether <.+>

Description

A shorthand for returning the result of a condition (true or false). This is functionally identical to using 'true if <condition> else false'. Many conditions also support being changed through this expression, typically using 'set'.

Examples

set {fly} to whether player can fly
broadcast "Flying: %whether player is flying%"
set whether the player can fly to true
toggle whether the player can pick up items

View source