promotional bannermobile promotional banner

ProtectionBlocks

ProtectionBlocks allows players to secure their builds with customizable protection blocks and manage permissions with ease.
Back to Files

protectionblocks-1.0.5.jar

File nameprotectionblocks-1.0.5.jar
Uploader
ReaperFtxReaperFtx
Uploaded
Jun 20, 2026
Downloads
63
Size
8.3 MB
Mod Loaders
Forge
File ID
8289562
Type
R
Release
Supported game versions
  • 1.20.1

Curse Maven Snippet

Forge

implementation fg.deobf("curse.maven:protection-blocks-1351203:8289562")

Learn more about Curse Maven

What's new

🎉 v1.0.5 — Discord alerts, performance & reliability

Big release: protection blocks now ping you on Discord whenever someone touches your zones (Free & Premium tiers available). On top of that, a catastrophic TPS regression around protected areas is fixed, the on-screen outline matches the real area, every blocked attempt now notifies the zone owner, and several smaller polish items.

🚨 Fixed — Critical performance

  • Server TPS would collapse near protected areas (especially TNT). The protection lookup had a defensive fallback doing a 101×101×101 brute-force scan (≈1M block-entity lookups) on every cache miss. With no protections in the loaded chunks every check missed, so an explosion (≈100 affected blocks) fired ≈100M lookups in a single tick, dragging TPS as low as 1 and making lit TNT appear to “vanish and reappear seconds later” as the server caught up. The lookup now goes straight to the per-chunk cache (which is already seeded on chunk load & on block place/break) — O(1) instead of O(101³). TPS stays stable even on TNT spam in a server full of protected zones.

🐛 Fixed

  • Protection outline size: the visualized grid drew a box much larger than the area it actually protected (e.g. a Basic block showed roughly an 11×11 outline while it only protected 5×5). The outline now matches the real protected cube exactly.
  • Zone name could not be saved: the “save zone name” button wrote to the wrong field, and even after saving the management screen kept showing the default “Unnamed zone”. Custom zone names are now stored server-side and the input refreshes instantly with the saved value — no need to reopen the screen.
  • Cancelled break attempts didn’t notify the zone owner. In survival the first left-click on a protected block is cancelled before Forge fires BlockEvent.BreakEvent, so the notification branch never ran — the intruder saw the red “no permission” message but the owner got no Discord DM. Both the left-click handler and the “break someone else’s protection block” path now fire the alert; the 60 s per-event debounce prevents duplicates if a path coincides with another.
  • “No permission to attack” chat spam. The red warning was being sent once per tick while the player held left-click, flooding the chat with 20+ identical lines per second. The block is still always blocked, but the message is now throttled to once every 3 s per (player, zone) — the next attempt on a different zone or after the cooldown shows it instantly again.
  • Item “disappeared” from the hotbar after a cancelled placement. When the server cancelled placing a block (placing inside another player’s zone without BUILD permission, conflict with another protection, tier disabled, block limit reached, or a hopper/dispenser/dropper pointed at someone else’s zone), the client’s prediction had already decremented the slot but the server never sent a sync — the slot looked empty until the player clicked it. The five cancel paths now force a full inventory state broadcast, so the slot rehydrates instantly.

🔒 Security hardening

  • Markdown injection in Discord DMs neutralised. Zone name, intruder name, dimension and detail strings sent to the bot now have every Markdown metacharacter escaped before they reach the Discord embed. Even if a serverToken leaks, the attacker can’t inject clickable phishing links (e.g. [Click](https://evil)) or fake formatting in the DMs your players receive — everything renders as literal text. Mentions were already blocked.
  • Rotate-token button added to each server’s detail page on the panel. If you suspect your serverToken was leaked, rotate it in one click: the new token is shown ONCE (same UX as registration), the old one stops working instantly, and your serverId / linked players / subscription stay intact. Just paste the new value into the server’s .toml and restart.
  • Big warning block at the top of the [bot] section of the auto-generated protectionblocks-server.toml, calling out that serverToken is a secret and listing the common leak vectors (public repos, support tickets with the config attached, world backups in public storage, http:// in the endpoint, etc.). New configs ship with it; existing ones get it on first reload.

✨ Added

  • Zone enter/leave titles: walking into a protected area now shows an “Entering” title with the zone’s name, and leaving it shows a “Leaving” title. Unnamed zones fall back to a localized “Protected Zone” label (EN/ES).

🔧 Changed

  • Protection sizes are now fully config-driven (no longer hardcoded in the mod). Each tier’s value in the server config is the radius in blocks measured from the block — the protected area is a cube of (radius × 2 + 1)³. Defaults reproduce the previous sizes: Basic 5×5×5, Advanced 11×11×11, Superior 15×15×15, Elite 21×21×21, Master 25×25×25. A config change now applies immediately to existing blocks.
  • Automatic config migration: existing servers update with no manual edits. The per-tier keys were renamed (*ProtectionRange → *ProtectionRadius) so old config files pick up the correct new values on first load, while every other setting (block limits, tier toggles, audit log, Discord-bot endpoint & token) is preserved.

🔔 New: Discord alerts (Free & Premium)

Every protection block can now alert you on Discord even while you’re offline. Link your in-game account to Discord and a private DM lands in your inbox whenever someone:

  • 🚷 Enters one of your protected zones.
  • 🛡️ Tries to break or place a block inside your zone (cancelled action still notifies).
  • 🛡️ Tries to interact with a chest, door or any block in your zone.
  • ⚠️ Bypass attempts: pistons, explosions (TNT / creeper) or fluids that try to reach your blocks without permission.

Free tier

  • 1 Minecraft server registered per Discord account.
  • All 4 alert types — same coverage as Premium.
  • 10-minute cooldown between alerts of the same kind on the same zone (keeps your DMs sane during a sustained attack).
  • Full 5-language Discord bot (Spanish, English, German, French, Italian) — DM language is the one you had selected when you ran /link.

Premium — 4,99 € / month

  • Unlimited Minecraft servers.
  • Real-time alerts: no per-server cooldown — only the 60 s mod-side debounce to prevent duplicate spam.
  • Manage your subscription from the self-service customer portal — cancel anytime, refunds per Spanish RD Legislativo 1/2007.
  • Secure payments processed by Stripe; we never store card data.

Get started in 30 seconds: in-game run /protection link, then on the InfinixMC Discord server run /link <code>. The bot replies privately confirming the link and you’ll start receiving alerts. Full step-by-step tutorial: protectionblocks.infinixmc.es/dashboard/docs/link.

📦 Compatibility

  • Minecraft 1.20.1
  • Forge 47.x
  • Client & Server

© 2026 VICXELCODE, S.L. — All rights reserved.

This mod has no related projects