# Command detection

A small module that can detect players executing certain commands.

### Configuration

```yaml
command-detection:
    enabled: true
    command-groups:
        - commands:
            - op
            - deop
            - lp
          actions: []
```

We can group certain commands and link actions to them.

### Actions

You can link actions whenever a player tries to execute a command inside the configured command-group.

Actions listed here should be in the [Staff ++ command format](https://wiki.staffplusplus.org/general-information/other/configuring-commands)

#### Placeholders:

| Placeholder value | Description                                            |
| ----------------- | ------------------------------------------------------ |
| %player%          | The playername of the player that executed the command |
| %command%         | The exact command the player tried to execute          |

#### Targets/Executors

|        |                                              |
| ------ | -------------------------------------------- |
| player | The player that tried to execute the command |

### Alerts

In addition players can also be notified about the commands being executing through the [alerts module](https://wiki.staffplusplus.org/features/alerts).

```yaml
alerts-module:

  # Whether or not staff will be notified when the command-detection gets triggered.
  command-detection: true
  command-detection-console: false
```
