Описание
# XRayAlerts
**XRayAlerts** is a plugin for Paper/Spigot servers that can alert staff members (or any player with the appropriate permission) whenever a player finds specific ores or items. It supports customizable alerts, configurable monitoring modes, and permission-based access control. The plugin is compatible with both Paper and Spigot servers running Minecraft 1.21+. Earlier versions have not been tested.
## Features
- **Configurable Alerts**: Customize the messages sent to staff when a player finds a monitored item or ore. Messages support color and formatting codes.
- **Vein Detection Mode**: Choose between two modes:
- **Block Mode**: Sends an alert for each block mined, indicating the number of items dropped.
- **Vein Mode**: Sends one alert for the entire vein when the first block in the vein is mined.
- **Permission Control**: Permissions to toggle alerts, receive alerts, and ignore alerts.
## Commands
### `/xrayalerts toggle`
Toggles the x-ray alerts on or off for the player who runs the command.\
**Permission**: `xrayalerts.toggle`\
**Usage**: `/xrayalerts toggle`
## Permissions
- **`xrayalerts.ignore`**: Prevents x-ray alerts from being triggered by the player.
- **`xrayalerts.receive`**: Allows the player to receive x-ray alerts.
- **`xrayalerts.toggle`**: Allows the player to toggle x-ray alerts on or off.
## Configuration
### `config.yml`
```yaml
alert-message: "&c&lX-Ray&r &7%player% found &6x%count% %item%."
mode: "block" # Options: "block", "vein"
monitored-blocks:
- ANCIENT_DEBRIS
- DEEPSLATE_DIAMOND_ORE
- DEEPSLATE_EMERALD_ORE
- DEEPSLATE_GOLD_ORE
- DIAMOND_ORE
- EMERALD_ORE
- GOLD_ORE
```