# Alerts

Staff++ kept the same alerting system that was already present in the old Staff+ plugin. Using this system staff members can subscribe to be notified when certain events happen. The notification is done through a message send in-game. If the staff member is not online he will miss the notification.

## Configuration

```yaml
############################################################
# +------------------------------------------------------+ #
# |                        Alerts                        | #
# +------------------------------------------------------+ #
############################################################

# Requires "permissions.notify" permission.
alerts-module:
  # Whether or not staff will be notified when a user changes their name.
  name-notify: true
  name-notify-console: false
  name-notify-bungee: ''

  # Whether or not staff will be notified when they are mentioned.
  mention-notify: true
  mention-notify-console: false
  mention-notify-bungee: ''

  # Whether or not staff will be notified when the chat module detect phrases.
  chat-phrase-detection: true
  chat-phrase-detection-console: false

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

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

  # The sound that is played to staff when notified.
  sound: ORB_PICKUP

  # Notifies staff when a player mines blocks listed in "blocks".
  xray-alerts:
    # Whether or not this module is enabled.
    enabled: true
    console: false
    notify-bungee: ''
    # Block type that, when mined, will invoke an alert.
    blocks: SPAWNER, EMERALD_ORE, DIAMOND_ORE, GOLD_ORE, IRON_ORE, COAL_ORE, LAPIS_ORE, REDSTONE_ORE

  alt-detect-notify:
      enabled: true
      console: false
      # Trust levels for which an alert should be triggered
      # POSITIVE;FAIRLY_POSITIVE;POSSIBLE;NOT_LIKELY
      trust-levels: FAIRLY_POSITIVE;POSITIVE
```

Enable all the alerts you want to be able to have your staff members receive.

## Subscribing to alerts

A staff member can subscribe to or unsubscribe from these events manually using the `/alerts [type]` command.

Keep in mind a staff member can only receive an alert if he has the correct permission.

```yaml
  # Permission for managing the alerts you will get
  alerts: "staff.staffplus.alerts"
  # Permission for receiving mention alerts.
  mention: "staff.alerts.mention"
  # Permission for receiving name change alerts.
  name-change: "staff.alerts.namechange"
  # Permission for receiving xray alerts.
  xray: "staff.alerts.xray"
  # Permission for receiving alt detect alerts.
  alerts-alt-detect: "staff.alerts.alt-detects"
```

### Bypassing triggering alerts

View the bypass permissions on the [permissions](/permissions-and-commands/permissions.md) page

### Sending over bungee.

Some alerts can be send over the bungee network. For example:

```
blacklist-notify-bungee: '[ALL]'
```

You either provided a `;` separate list of server names. Or `[ALL]` if you want to send the alerts to all server in the network.

### Example

(Un)Subscribe yourself to alt account detection alerts

```
/alerts ALT_DETECT
```


---

# Agent Instructions: 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:

```
GET https://wiki.staffplusplus.org/features/alerts.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
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.
