# Thresholds

Thresholds can be reached by players if they receive too many warnings. An example configuration:

```yaml
severity-levels:
  - name: STEALING
    score: 1
    expiresAfter: 1 WEEK
  - name: GRIEFING
    score: 3
  - name: BULLYING
    score: 6
thresholds:
  - score: 3
    actions:
      - command: "tempban %target% 4 days"
  - score: 6
    actions:
      - command: "ban %target%"
        rollback-command: 
          command: "unban %target%" 
```

We defined two thresholds. When the player reaches the first threshold of a total warning score of 3 he will be temporarily banned. Keep in mind that his total score wont be reset. Which means that if he gets another warning for stealing for example, his total score will be 4 and he will immediately get temporarily [banned](https://wiki.staffplusplus.org/features/banning) again. So once you reach a threshold you will be punished more severely on subsequent warnings.

However warnings can be **expired**. This mean they will no longer be counted during threshold calculations.

You will notice you can also define [rollback-commands](https://wiki.staffplusplus.org/features/warnings/..#actions-and-rollback) here. These will get executed if the warning that originally caused a threshold breach gets deleted or [appealed](https://wiki.staffplusplus.org/features/warnings/appealing).

The second threshold bans a player when he reaches a total score of 6. This also means that a warning for bullying in this example will immediately ban the player.

### **Score Calculation Example**

Consider player "myman" has following warning history:

| Type     | score | appeal approved | expired |
| -------- | ----- | --------------- | ------- |
| STEALING | 1     | true            | false   |
| GRIEFING | 3     | false           | false   |
| GRIEFING | 3     | false           | true    |
| STEALING | 1     | true            | true    |
| BULLYING | 6     | false           | false   |

In this example the player his total score will be: **9**

* The first warning does **not** count because it was **successfully appealed**
* The second warning **counts**
* The third warning does **not count** because it is expired
* The fourth warning does **not count** because it was **successfully appealed AND expired**
* The fifth warning **counts**

&#x20;&#x20;
