Compatibility
Minecraft: Java Edition
Platforms
Links
Tags
Creators
Details
โฎ TownyPacifist
A lightweight Towny addon that enforces peace for peaceful towns โ everywhere, not just within their borders.
๐ About
Many servers struggle with a common problem: players from peaceful towns getting killed by aggressive towns, or peaceful town members attacking others without consequence.
TownyPacifist solves this by hooking directly into Towny's own peaceful flag (/t toggle peaceful). No custom data, no extra commands โ if a town is marked as peaceful in Towny, this plugin enforces that everywhere on the map.
โจ Features
- Zero custom storage โ reads directly from Towny's
isNeutral()flag - Bidirectional protection โ peaceful towns can't attack OR be attacked
- Arena support โ peaceful players can still PvP inside Towny arena plots (
/plot set arena) - EventWar integration โ works naturally alongside EventWar's neutrality system
- SiegeWar integration โ respects SiegeWar's own peaceful town system when installed
- TownyCaptureSites integration โ allows peaceful players to fight inside capture sites when installed
- Multi-language โ ships with 9 languages (en-US, pt-BR, es-ES, fr-FR, de-DE, zh-CN, ru-RU, pl-PL, tr-TR)
- Lightweight โ a single event listener, no databases, no commands
- Cross-platform โ runs on Bukkit, Spigot, Paper, Purpur and Folia
๐ Dependencies
| Plugin | Required |
|---|---|
| Towny | โ Required |
| EventWar | โ Optional (integrates automatically) |
| SiegeWar | โ Optional (integrates automatically) |
| TownyCaptureSites | โ Optional (integrates automatically) |
โ๏ธ How It Works
TownyPacifist listens to TownyPlayerDamagePlayerEvent and checks both players' towns using Towny's API:
Player A hits Player B
โโ Is either player from a neutral (peaceful) town?
โโ No โ do nothing, let Towny handle it normally
โโ Yes โ are they inside an arena plot?
โ โโ Yes + arenas allowed โ permit combat (no spam, notified on entry)
โ โโ No โ cancel damage + send message
โโ Both peaceful โ cancel damage + specific message
The "peaceful" status is set by the town mayor using Towny's own command:
/t toggle peaceful
No TownyPacifist commands needed.
๐ Config
# Enable or disable all protection globally
enabled: true
# Allow peaceful town members to PvP inside Towny arena plots
allow-pacifist-in-arenas: true
# Allow peaceful town members to fight inside TownyCaptureSites plots (requires TownyCaptureSites)
allow-pacifist-in-capture-sites: true
๐ Adding a Language
TownyPacifist uses Towny's built-in translation system. Messages are delivered in each player's own language automatically.
- Go to
plugins/TownyPacifist/lang/ - Copy
en-US.ymland rename it (e.g.es-ES.yml) - Translate the messages
- Towny picks it up automatically โ no config change needed
๐จ Building from Source
Requirements:
- JDK 21 (for compilation)
- Gradle 8.12 (or use the included
gradlew) - Towny JAR โ
libs/Towny-x.x.x.x.jar(download from Towny releases) - EventWar JAR โ
libs/EventWar-x.x.x.jar(optional, for IDE support only)
./gradlew build
# Output: build/libs/TownyPacifist-1.0.jar
๐บ๏ธ Planned Integrations
- [x] Capture sites
- [x] SiegeWar
๐ License
Apache 2.0 โ see LICENSE
๐ค Author
Made by RN_Axol


