Перейти к содержимому
Mineforgian

ExplosionProtector

Addon for Coreprotect that protects buildings from explosions if the block was placed by the player

657 загрузок3 подписчиковMITfoliapaperpurpurspigot

Обновлён 25 февраля 2026 г. · опубликован 7 апреля 2025 г.

  • Protection

💣 ExplosionProtector addon for CoreProtect

Protect your players’ builds from unwanted explosions
A lightweight Spigot/Paper plugin that uses CoreProtect to prevent explosions from destroying blocks placed by players.


🧠 Description

ExplosionProtector hooks into all types of explosions (TNT, creeper, ender crystal, bed/respawn-anchor explosions, etc.) and checks each affected block’s origin via the CoreProtect API.

  • Player-placed blocks are protected and remain intact.
  • All other blocks (natural terrain, plugin-placed, etc.) are destroyed as normal.
  • TNT chain reactions are still allowed: TNT will break TNT and natural blocks, but any player-placed block in the blast radius remains safe.

This is ideal for:

  • PvE or Creative servers where you want to preserve player builds.
  • Minigame or adventure maps that use TNT but need to protect certain structures.
  • Any world where accidental or malicious explosions should not ruin player work.

⚙️ Installation

  1. Download the latest ExplosionProtector.jar.
  2. Place it into your server’s plugins/ directory.
  3. Ensure you have CoreProtect v10+ installed and enabled.
  4. Start or reload your server. You should see in console:
    [ExplosionProtector] Plugin enabled: protecting player-placed blocks from explosions.
    

🛠 Configuration

All settings are in plugins/ExplosionProtector/.

1. config.yml

# config.yml
# Supported language codes: en, ru, es, zh, hi, ar, fr, de, ja, pt
language: en

2. Message files

On first run the plugin extracts:

  • messages.yml (default English)
  • messages_ru.yml
  • messages_es.yml
  • messages_zh.yml
  • messages_hi.yml
  • messages_ar.yml
  • messages_fr.yml
  • messages_de.yml
  • messages_ja.yml
  • messages_pt.yml

Each contains all user-facing strings. To add or adjust translations, edit the corresponding file in the plugin’s folder.


💻 Commands

All commands require the explosionprotector.info permission (default OP-only).

Command Description
/ep status or /ep info Show plugin status and number of blocks protected in the last explosion.
/ep language <code> (Admin) Change plugin language at runtime. Valid codes: en, ru, es, zh, hi, ar, fr, de, ja, pt.

Examples

/ep status
# Status: enabled
# Blocks protected in last operation: 17

/ep language ru
# Language set to 'ru'.

🧱 Dependencies

  • [✅] Spigot / Paper (1.13+)
  • [✅] CoreProtect (v10 or higher)

Версии

ВерсияКаналИграЗагрузчикиДатаСкачать
2.2Релиз1.21.8, 1.21.9, 1.21.10, 1.21.11folia, paper, purpur, spigot25 февраля 2026 г.Скачать (13 КБ)
2.0Релиз1.21.8folia28 ноября 2025 г.Скачать (13 КБ)
2.0Релиз1.19.1, 1.19.2, 1.19.3, 1.19.4paper, purpur, spigot27 апреля 2025 г.Скачать (13 КБ)
2.0Релиз1.20.3, 1.20.4, 1.20.5, 1.20.6paper, purpur, spigot27 апреля 2025 г.Скачать (13 КБ)
2.0Релиз1.21.5, 1.21.6, 1.21.7, 1.21.8paper, purpur, spigot27 апреля 2025 г.Скачать (13 КБ)
1.0Релиз1.20.3, 1.20.4, 1.20.5, 1.20.6paper, purpur, spigot27 апреля 2025 г.Скачать (3 КБ)
1.0Релиз1.19.1, 1.19.2, 1.19.3, 1.19.4paper, purpur, spigot27 апреля 2025 г.Скачать (3 КБ)
1.0Релиз1.21.2, 1.21.3, 1.21.4, 1.21.5paper, purpur, spigot7 апреля 2025 г.Скачать (3 КБ)

Ченджлог

2.2Релиз1.21.9, 1.21.10, 1.21.11 · 25 февраля 2026 г.

What changed

  • Paintings and item frames are no longer fully unbreakable.
  • They are now protected only from explosions.
  • Normal break behavior is preserved for all non-explosion causes.

Technical fixes

  • Added explosion-only checks for hanging entities:
  • HangingBreakEvent -> cancel only EXPLOSION
  • EntityDamageEvent -> cancel only BLOCK_EXPLOSION / ENTITY_EXPLOSION
  • Removed invalid frame/painting handling from explosion blockList logic.

Dependency update

  • CoreProtect API updated to 23.1 (from 22.4).

Recommended setup

  • Use CoreProtect 23+ to avoid known 22.4 entity logging warnings.
2.0Релиз1.21.8 · 28 ноября 2025 г.

folia release

2.0Релиз1.19.2, 1.19.3, 1.19.4 · 27 апреля 2025 г.

Changelog

[2.0] – 2025-04-27

Added

  • Guava-backed lookup cache (Cache<String,Boolean> placementCache) to dramatically reduce repeated CoreProtect block lookups.
  • Localization support via config.yml (language: <code>) and external messages_<lang>.yml files for English, Russian, Spanish, Chinese, Hindi, Arabic, French, German, Japanese and Portuguese.
  • Automatic resource extraction of all messages*.yml files from the plugin JAR into the data folder on first run.
  • /ep command with three sub-commands:
    • status/info — shows plugin status and number of blocks protected in the last explosion.
    • language <code> — dynamically switch the plugin’s language at runtime without a server restart.
  • Dynamic message loading (loadLanguageMessages(lang)) to reload translated messages immediately after /ep language is run.

Changed

  • Explosion handling consolidated:
    • TNT chain reactions now explicitly allow TNT to break through, while all other blocks placed by players remain protected.
    • Unified logic for EntityExplodeEvent and BlockExplodeEvent into two succinct handlers.
  • CoreProtect API check simplified to APIVersion() >= 7 (from >= 10) and proper plugin‐enabled test.
  • Logging and user feedback moved entirely into configurable message files instead of hard-coded strings in code.
  • Comments and documentation updated to English throughout the codebase.

Fixed

  • NPE safety: all CoreProtect lookups and message loads guard against null and absent resources.
  • TNT projectile: improved handling in ProjectileHitEvent to prevent lingering TNT entities from exploding unexpectedly.
2.0Релиз1.20.4, 1.20.5, 1.20.6 · 27 апреля 2025 г.

Changelog

[2.0] – 2025-04-27

Added

  • Guava-backed lookup cache (Cache<String,Boolean> placementCache) to dramatically reduce repeated CoreProtect block lookups.
  • Localization support via config.yml (language: <code>) and external messages_<lang>.yml files for English, Russian, Spanish, Chinese, Hindi, Arabic, French, German, Japanese and Portuguese.
  • Automatic resource extraction of all messages*.yml files from the plugin JAR into the data folder on first run.
  • /ep command with three sub-commands:
    • status/info — shows plugin status and number of blocks protected in the last explosion.
    • language <code> — dynamically switch the plugin’s language at runtime without a server restart.
  • Dynamic message loading (loadLanguageMessages(lang)) to reload translated messages immediately after /ep language is run.

Changed

  • Explosion handling consolidated:
    • TNT chain reactions now explicitly allow TNT to break through, while all other blocks placed by players remain protected.
    • Unified logic for EntityExplodeEvent and BlockExplodeEvent into two succinct handlers.
  • CoreProtect API check simplified to APIVersion() >= 7 (from >= 10) and proper plugin‐enabled test.
  • Logging and user feedback moved entirely into configurable message files instead of hard-coded strings in code.
  • Comments and documentation updated to English throughout the codebase.

Fixed

  • NPE safety: all CoreProtect lookups and message loads guard against null and absent resources.
  • TNT projectile: improved handling in ProjectileHitEvent to prevent lingering TNT entities from exploding unexpectedly.
2.0Релиз1.21.6, 1.21.7, 1.21.8 · 27 апреля 2025 г.

Changelog

[2.0] – 2025-04-27

Added

  • Guava-backed lookup cache (Cache<String,Boolean> placementCache) to dramatically reduce repeated CoreProtect block lookups.
  • Localization support via config.yml (language: <code>) and external messages_<lang>.yml files for English, Russian, Spanish, Chinese, Hindi, Arabic, French, German, Japanese and Portuguese.
  • Automatic resource extraction of all messages*.yml files from the plugin JAR into the data folder on first run.
  • /ep command with three sub-commands:
    • status/info — shows plugin status and number of blocks protected in the last explosion.
    • language <code> — dynamically switch the plugin’s language at runtime without a server restart.
  • Dynamic message loading (loadLanguageMessages(lang)) to reload translated messages immediately after /ep language is run.

Changed

  • Explosion handling consolidated:
    • TNT chain reactions now explicitly allow TNT to break through, while all other blocks placed by players remain protected.
    • Unified logic for EntityExplodeEvent and BlockExplodeEvent into two succinct handlers.
  • CoreProtect API check simplified to APIVersion() >= 7 (from >= 10) and proper plugin‐enabled test.
  • Logging and user feedback moved entirely into configurable message files instead of hard-coded strings in code.
  • Comments and documentation updated to English throughout the codebase.

Fixed

  • NPE safety: all CoreProtect lookups and message loads guard against null and absent resources.
  • TNT projectile: improved handling in ProjectileHitEvent to prevent lingering TNT entities from exploding unexpectedly.
1.0Релиз1.21.3, 1.21.4, 1.21.5 · 7 апреля 2025 г.

First release

Комментарии

Загружаем…