MonitoringMinecraft MonitoringMinecraft

TownyPacifist - Addon

Плагин BukkitFoliaPaper

Плагин для Майнкрафт: защищает мирные города Towny от боёв с поддержкой арен, SiegeWar и TownyCaptureSites.

105 скачиваний 1 подписчик
Оцените первым

☮ TownyPacifist

Modrinth GitHub Release License

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.

  1. Go to plugins/TownyPacifist/lang/
  2. Copy en-US.yml and rename it (e.g. es-ES.yml)
  3. Translate the messages
  4. 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

  • Capture sites
  • SiegeWar

📜 License

Apache 2.0 — see LICENSE


👤 Author

Made by RN_Axol

Смотри также

Похожие подборки плагины — по версиям Майнкрафта, загрузчикам и жанрам.

Сервера Майнкрафт

Играть интереснее на сервере — выбирай в рейтинге серверов Майнкрафт и заходи прямо сейчас.

Battle Mine
Battle Mine Java + BE
4 онлайн
1.21.4 — 26.2 версия
ОТКРЫТИЕ! 20 + различных ивентов, 10+ различных боссов, много интересных механник
SkyBars
SkyBars Java + BE
1089 онлайн
1.8 — 26.2 версия
🎮 ВЫЖИВАНИЕ ⚔️ АНАРХИЯ 🚗 ГТА РП 🎤 ГОЛОСОВОЙ ЧАТ 🎁 БЕСПЛАТНЫЙ ДОНАТ 🌟 СМП 💻 ПК+ТЕЛЕФОН
BerryCraft
BerryCraft Java + BE
3 онлайн
1.21.8 — 26.2 версия
Пройди путь от хаоса анархии до работы на складе с заказами и карьерным ростом
SeasonEra
SeasonEra Java + BE
7 онлайн
1.9 — 26.2 версия
Выживание • Экономика • Кланы • Приваты • Ивенты • PVP • Работа
MineLauncher
Лаунчер Майнкрафт без лицензии — все версии
Бесплатный лаунчер для ПК и Андроид — все версии 26.2, 1.21.11, 26.1.2, 1.21.8. Fabric, NeoForge, Forge, шейдеры, моды и скины в один клик.
Без лицензии Fabric, NeoForge, Forge Моды, шейдеры, скины Все версии Майнкрафта ПК и Андроид Для слабых ПК Сервера в лаунчере
Скачать бесплатно
Windows и Андроид · Бесплатно · Без лицензии
Наш чат