# Conditions

### Syntax

Syntax: `[<condition>:<conditionValue>[,else-ifConditions][,elseValue]]`

The simplest condition would be something like: `[condition:value]` where if the condition is met, the value would be used, if it isn't met, nothing would be used.

To add else-if conditions, add them after like following:

`[condition1:value1,condition2:value2,condition3:value3,elseValue]`

In the example above `value1` will be used if `condition1` is met, if not, it will try `condition2`, if met, `value2` will be used, if not, it will test `condition3`, if met, `value3` will be used, if not `elseValue` will be used.

{% hint style="info" %}
You can add as many else-if-statements as you want!
{% endhint %}

**Note:** Both else-if-conditions and else-conditions are optional!

{% hint style="info" %}
In the condition part of a condition, all strings (texts) have to be in quotes! (")

**For example, `[{target_block}: value]` wouldn't work, instead do: `["{target_block}": value]`.**
{% endhint %}

**More examples:**

```
[condition:value]
[condition:value,elseValue]
[condition1:value1,condition2:value2,elseValue]
[condition1:value1,condition2:value2,condition3:value3]
```

{% hint style="warning" %}
You can not have a condition within a condition, instead you can use AND and IF operators to achive the same thing.
{% endhint %}

### Allowed operators inside the condition part

| Operator | Description              |
| -------- | ------------------------ |
| =        | Equals                   |
| ==       | Equals                   |
| !=       | Not equals               |
| <>       | Not equals               |
| <        | Less than                |
| <=       | Less than or equal to    |
| >        | Greater than             |
| >=       | Greater than or equal to |
| &&       | Boolean and              |
| \|\|     | Boolean or               |

### Examples

#### FPS

`FPS: [{fps} > 60:&a, {fps} > 20:&6,&c]{fps}`

The condition above would make the fps green if the player has more than 60 fps, orange if more than 20 or red if less than 20.
