EN / English
------------
Protection plugin against offline-mode raid/scanner attacks for Spigot/Paper 1.21.x.
Features
- Nickname ⇄ IP lock with multi-IP grace and optional /24 subnet allowance
- Player/IP allowlists
- New-player restrictions (blocked commands + command cooldown)
- Global block for dangerous commands (e.g., execute)
- Strict protection mode for admin nicknames (only pre-authorized IPs)
Compatibility
- Spigot/Paper 1.21 – 1.21.x (`api-version: 1.21`)
Installation
1. Place `build/libs/AntiRaidSystem-0.0.1.jar` into `plugins`.
2. Start server to generate the config.
3. Change lang in config.yml 'default_language: ru' to 'default_language: en'
3. Adjust `config.yml` to your needs.
## Quick start
1. Add your admin nicknames to `protected.players` (or use `/ars protect <player>`).
2. For users with frequently changing IPs, either use `/ars authorize` as needed or increase `general.ip_lock_auto_learn_up_to`(not safe!).
3. If you have op, use /ars trust 'nicname' for trust or /ars untrust 'nickname'
4. Shield done!
Scenarios & solutions
- Player with dynamic IP:
- Default behavior: kick on IP change. Solution: `/ars authorize <nick> <new-ip>`.
- Admin nickname targeted:
- Add to `protected.players`. Only pre-authorized IPs may join.
- New players spamming commands:
- Raise `security.command_cooldown_seconds` (e.g., 2–3).
- Attempts to abuse WorldEdit:
- Untrusted already blocked for `//` and common WE commands. Keep them untrusted (24h) or grant trust manually `/ars trust <player>`.
- Curious users checking plugins/version:
- Untrusted blocked for `pl/plugins/version/help`. Extend `security.blocked_for_untrusted` if needed.
- Need to quickly allow full commands to a user:
- Grant trust: `/ars trust <player>` (adds to `trusted.nicknames`). Revoke: `/ars untrust <player>`.
## Commands
- `/ars reload` — reload config
- `/ars authorize <player> <ip>` — authorize IP for a nickname
- `/ars allowplayer <player>` — add allowed player
- `/ars allowip <ip>` — add allowed IP
- `/ars protect <player>` — enable strict protection for nickname
- `/ars unprotect <player>` — disable strict protection
Permission: `ars.admin` (default: OP).
## Config (highlights)
- `general.ip_lock_enabled`: enable nickname ⇄ IP lock
- `general.ip_lock_auto_learn_up_to`: auto-learn up to N IPs per nickname
- `general.ip_lock_allow_same_subnet_24`: allow same /24 subnet
- `general.allowlist_players_only` / `general.allowlist_ips_only`: strict allowlist modes
- `general.block_dangerous_commands_globally`: block commands for all
- `security.command_cooldown_seconds`: per-player command cooldown
- `security.blocked_for_untrusted`: blocked commands for new players (WorldEdit/FAWE, scoreboard, plugin info)
- `protected.players`: nicknames with strict protection
- `messages`: RU/EN messages, bilingual kick texts for unknown locale
See `config.yml` for fully documented options (RU/EN comments).