> For the complete documentation index, see [llms.txt](https://airdevelopment.gitbook.io/docs/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://airdevelopment.gitbook.io/docs/global-features/conditions.md).

# Conditions

## General

Conditions are defined as a list of strings. Every entry in the list must pass for the block to be considered satisfied. They behave as an implicit **AND** chain across items.

```yaml
conditions:
  - "%player_health% >= 10"
  - "%player_gamemode% == SURVIVAL"
```

Every condition follows the same basic shape:

```yaml
- "<value> <operator> <value>"
```

## Syntax

### Values

| Value                        | Description                                                                            |
| ---------------------------- | -------------------------------------------------------------------------------------- |
| A **literal**                | Text, a number, or a boolean (`true`/`false`)                                          |
| A **placeholder**            | `%player_health%`, `%aircore_var_kills%`, any PlaceholderAPI expansion.                |
| An **arithmetic expression** | Values combined with `+ - * / MOD`, optionally wrapped in parentheses. See Arithmetic. |

Anywhere this page says `<value>`, all three are valid.

### Operators

| Symbol | Operator         |
| ------ | ---------------- |
| `==`   | Equals           |
| `!=`   | Not equals       |
| `=~`   | Equals CI        |
| `!~`   | Not equals CI    |
| `>`    | Greater than     |
| `<`    | Less than        |
| `>=`   | Greater or equal |
| `<=`   | Less or equal    |
| `<>`   | Contain          |
| `!<>`  | Does not contain |
| `\|-`  | Starts with      |
| `-\|`  | Ends with        |

{% hint style="warning" %}
Numeric operators (`>`, `<`, `>=`, `<=`) require both sides to be parseable as numbers. If either side cannot be parsed, the condition evaluates to `false`.
{% endhint %}

### Arithmetic

Any `<value>` can itself be an arithmetic expression: numbers and placeholders combined with `+ - * / MOD`, with standard order of operations (`*`, `/`, `MOD` before `+`, `-`).

```yaml
conditions:
  - "%vault_balance% >= %shop_price% * 2"
  - "%aircore_var_kills% MOD 100 == 0"
  - "(%player_health% + %player_absorption%) / %player_max_health% >= 0.5"
```

### Grouping

A single condition entry can combine more than one `<value> <operator> <value>` check.

#### AND / OR prefix

Prefix the line with `AND` or `OR`, followed by two or more plain comparisons separated by spaces. This form is intentionally simple: every comparison in the line must be a plain `<value> <operator> <value>` triplet - no arithmetic, no parentheses, no nesting. If you need either of those, use parentheses instead (below).

```yaml
conditions:
  - "AND %player_health% >= 10 %vault_balance% >= 500"
```

Both `%player_health% >= 10` and `%vault_balance% >= 500` must pass.

```yaml
conditions:
  - "OR %player_gamemode% == CREATIVE %player_gamemode% == SPECTATOR"
```

At least one of the two must pass.

#### Parentheses (for arithmetic and nested logic)

Wrap a group in `( ... )` and use `AND`/`OR` between groups directly in the expression, rather than as a line prefix. This is the form to reach for whenever a check involves arithmetic, or needs an `OR` nested inside an `AND` (or vice versa) - something the prefix form above can't express, since it only supports one flat list of plain comparisons.

```yaml
conditions:
  - "(%player_gamemode% == SURVIVAL OR %player_gamemode% == ADVENTURE) AND %vault_balance% >= 100"
```

The player needs sufficient balance, AND must be in one of the two listed gamemodes. Parentheses can nest to any depth:

```yaml
conditions:
  - "(%player_gamemode% == SURVIVAL AND (%player_health% >= 10 OR %aircore_var_two_factor_enabled% == true)) OR %luckperms_primary_group_name% == admin"
```

#### Combining list-level AND with inline grouping

Because the list itself is an implicit AND chain, you can mix strategies across entries - one plain comparison, paired with a prefix or parenthesized line:

```yaml
conditions:
  - "%vault_balance% >= 100"                                            # must have balance
  - "OR %player_gamemode% == SURVIVAL %player_gamemode% == ADVENTURE"   # must be in one of these modes
```

The player needs both: sufficient balance, and a matching gamemode.

## Quick reference

| Need                                                   | Use                                     |
| ------------------------------------------------------ | --------------------------------------- |
| A single comparison                                    | `<value> <operator> <value>`            |
| Two or more plain comparisons, all required or any-one | `AND ...` / `OR ...` prefix             |
| A comparison involving arithmetic                      | Arithmetic inline, e.g. `%x% + 5 == 12` |
| Nested logic (`OR` inside `AND`, etc.)                 | Parentheses                             |


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter, and the optional `goal` query parameter:

```
GET https://airdevelopment.gitbook.io/docs/global-features/conditions.md?ask=<question>&goal=<endgoal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
