#
Commands
| Command | Description |
|---|---|
| `/t raid <town>` | Open a Towny confirmation, then start the preparation phase. |
| `/t raid cancel` | Cancel your own raid during preparation. |
| `/t tribute request <amount>` | Attacker offers to cancel the raid in exchange for a tribute. |
| `/t tribute accept` | Defender accepts the tribute and the raid is cancelled. |
| `/t tribute deny` | Defender rejects the tribute offer. |
| `/ta raids reload` | Hot-reload `config.yml` and the active language file. |
| `/ta raids start <attacker> <defender>` | Force a raid without confirmation. |
| `/ta raids end <town>` | Force-end the raid involving a town. |
| `/ta raids phase <town> <pending\|battle>` | Move an active raid between phases. |
# Permissions
| Node | Description |
|---|---|
| `townyraids.raid.declare` | Required for `/t raid <town>`. |
| `townyraids.raid.cancel` | Required for `/t raid cancel`. |
| `townyraids.tribute.request` | Required for `/t tribute request`. |
| `townyraids.tribute.accept` | Required for `/t tribute accept` / `deny`. |
| `townyraids.admin` | Root access to the admin command. |
| `townyraids.admin.reload` | `/ta raids reload`. |
| `townyraids.admin.force-start` | `/ta raids start`. |
| `townyraids.admin.force-end` | `/ta raids end`. |
| `townyraids.admin.force-phase` | `/ta raids phase`. |
Player commands additionally require the player to be the mayor or an assistant of the town.
#
Configuration (`config.yml`)
```yaml
language: en
timings:
preparation-seconds: 300
battle-seconds: 900
attacker-cooldown-seconds: 86400
defender-protection-seconds: 172800
tribute-request-seconds: 120
confirmation-seconds: 30
requirements:
defender-min-residents: 3
attacker-min-residents: 3
require-different-nations: true
block-declaring-while-under-raid: true
battle-flags:
pvp: true
explosion: true
fire: true
mobs: true
tribute:
enabled: true
min-amount: 100.0
max-amount: 0.0
storage:
type: sqlite
sqlite-file: storage.db
mysql:
host: localhost
port: 3306
database: townyraids
username: root
password: ""
```
All durations are in seconds. Set `tribute.max-amount: 0.0` to remove the upper bound. Switch `storage.type` to `mysql` for shared-state clusters.
#
Languages
Bundled language files live in `plugins/TownyRaids/lang/`:
- `en.yml` — English
- `ru.yml` — Русский
- `es.yml` — Español
- `tr.yml` — Türkçe
Every value is parsed as [MiniMessage](
https://docs.advntr.dev/minimessage/). Missing keys fall back to English. Set `language` in `config.yml` to switch the active file or drop your own translation in.
#
Lifecycle
1. Declaration. Attacker mayor runs `/t raid <town>`, gets a Towny confirmation prompt.
2. Preparation (`PENDING`). Configurable countdown, defender can call players, prepare defenses or pay tribute. Attacker can still cancel with `/t raid cancel`.
3. Battle (`BATTLE`). Defender's flags switch to the configured `battle-flags` (PvP, explosions, fire, mobs). Boss bar + title notify everyone.
4. End. When the battle timer runs out (or an admin forces it), original flags are restored, attacker enters cooldown, defender enters protection.