StructureGuard - Protect Villages, Temples & Modded Structur
V1.0.7Automatic WorldGuard protection for ANY structure — vanilla, modded, or datapack.
V1.0.7latestStructureGuard v1.0.7Jan 26, 2026 Update Notes - v1.x.x Bug Fix: Multi-World Structure Detection Problem: StructureGuard was only detecting structures correctly in the first world it initialized for. When players moved to other worlds (resource worlds, The End, Nether, etc.), structure detection would fail silently - returning results from the wrong world or finding nothing. Cause: The NMS reflection cache (ServerLevel, StructureManager) is world-specific, but the code was not re-initializing when querying a different world. Once cached for "world", it would incorrectly reuse that cache for "world_resource" or "world_the_end". Fix: Added world comparison checks to re-initialize the cache when the target world changes Impact: Structure detection now works correctly across all worlds on your server.V.1.0.6StructureGuard v1.0.6Jan 25, 2026 StructureGuard v1.0.6 - Update Notes Performance Fixes Fixed chunk loading lag - Replaced synchronous database queries with in-memory cache. Scanned chunks are now loaded into memory on startup, eliminating DB queries during chunk load events. Batched database writes - Chunk scan records are now queued and written in batches of 50, reducing DB overhead. Bug Fixes Fixed structures not auto-protecting on first login - StructureFinder reflection cache is now initialized during plugin startup, before any chunks load. Previously, structures loaded before the cache was ready were not being scanned. Config Improvements Cleaner config format - Protection rules now use actual colons in config keys (YAML auto-quotes them): # New format (matches in-game names): "minecraft:village*": enabled: true # Old formats still work for backwards compatibility: minecraft--village*: minecraft_village: Diagnostics Enhanced /sg probe - Now dumps all Map-returning methods on the probed chunk, helping diagnose structure detection issues.v1.0.3.1StructureGuard v1.0.3.1Jan 25, 2026 Revert to working versionv1.0.5StructureGuard v1.0.5Jan 25, 2026 Fix: Thread Explosion on Mass Player Login Problem: When many players logged in simultaneously (100+), the plugin would spawn hundreds of async tasks competing for database access, causing OutOfMemoryError: unable to create native thread and server crashes. Solution: Replaced unbounded async task spawning with a fixed thread pool: 10 worker threads process chunks concurrently (prevents thread explosion) Unbounded queue ensures no chunks are ever skipped All chunks are processed, just rate-limited to 10 at a time Changes Added with fixed 10-thread pool for chunk processing now shows pending queue count when chunks are waiting Proper shutdown of thread pool on plugin disable Technical Details Max 10 concurrent chunk scans regardless of player count 200+ simultaneous logins = chunks queue up, process at steady rate No data loss - every chunk eventually gets scanned No behavior changes to structure detection or protectionv1.0.4.2StructureGuard v1.0.4.2Jan 25, 2026 StructureGuard Update Fixed chunk processing - structures are now detected and protected correctly again. Changes: - Replaced async executor with tick-based processor (5 chunks/tick) - Queue is now unbounded - no chunks are ever skipped - All structures will be protected, even during mass player logins After heavy load, the queue may take a minute or two to drain, but every structure will be processed.v1.0.4.1StructureGuard v1.0.4.1Jan 25, 2026 StructureGuard Hotfix Fixed a critical bug introduced in the previous update where the chunk processor task was being silently discarded on startup, causing no structures to be protected. You should now see "Chunk processor started" in your server console when the plugin loads.v1.0.4StructureGuard v1.0.4Jan 25, 2026 StructureGuard Update - Critical Bug Fix Issue: Server crashed with "OutOfMemoryError: unable to create native thread" when many players logged in simultaneously after enabling StructureGuard. What Was Happening: When multiple players joined at once, every chunk load spawned a new async task. Hundreds of threads competed for the SQLite database lock, causing Bukkit to spawn even more threads until the JVM ran out of memory. What's Fixed: - Thread count: Unbounded (hundreds) -> Max 2 workers - Chunk queue: None -> Bounded (500 max) - DB writes: 1 per chunk -> Batched (50 per write) - Overflow handling: None (crash) -> Graceful drop & retry Technical Changes: - Bounded ThreadPoolExecutor with max 2 worker threads - Chunk processing queue with sequential processing and 10ms delay - Batched database writes to reduce SQLite lock contention - Deferred DB checks from event handler to queue processor - Graceful shutdown that flushes pending data on server stop The server will now handle mass player logins without any issues.v1.0.3StructureGuard v1.0.3Jan 25, 2026 Update Notes - v1.0.3 Bug Fix: Modded Structure Detection Problem: Structures from certain mods (Cobbleverse, Pixelmon, etc.) were not being detected by /sg info and /sg probe, even though they appeared in /sg listall. Cause: The plugin has two detection paths: Mojang path: Uses StructureManager.getAllStructuresAt() Chunk path: Uses Chunk.getStructureStarts() The chunk path was only being initialized when the Mojang path failed. On hybrid servers where both work, some mods store structures only in the chunk path, causing them to be missed. Fix: Both detection paths are now always initialized. The Mojang path is used as primary, with chunk path as automatic fallback when Mojang returns no structures for a chunk. Improvements /sg probe now shows nearest database entry, helping distinguish between: Live detection (from Minecraft's structure system) Database records (from previous scans/chunk loads)What This Fixes Cobbleverse structures now properly detected Other mods using chunk-based structure storage now work /sg info shows all structures you're standing in Auto-protection triggers correctly for modded structures
v1.0.2StructureGuard v1.0.2Jan 25, 2026 [1.0.2] Complete Update - Bug Fixes, Config Sync & Full Documentation BUG FIXES: • Fixed deny-message and other string-based flags not applying to regions • Fixed greeting-title, farewell, and other non-state flags being ignoredNEW FEATURES: • Config Sync - Edit flags in config.yml, run /sg reload, changes apply to ALL existing regions • No need to recreate regions when changing flags! FULL COMMAND LIST: Discovery: • /sg listall - Show all structure types • /sg find <structure> - Locate nearest structure • /sg info - Structure info at location Protection: • /sg protect/unprotect/enable/disable/rules Regions & Flags: • /sg flag <pattern> <flag> <value> • /sg addowner/addmember/removeowner/removemember • /sg clearregions <pattern> [world] - Remove regions • /sg resetworld <world> - Clear world data (for resets) Utility: • /sg list/status/reload/debug
CONFIGURATION: • disabled-worlds - Skip protection in resource/mining worlds • default-flags - Set deny-message, greeting-title, etc. • Full flag sync on /sg reload PERMISSIONS: • structureguard.admin - All commands • structureguard.find - /sg find • structureguard.listall - /sg listall • structureguard.teleport - Clickable teleport links
V1.0.1Jan 23, 2026
Similar projects
Plugin →Let Me Despawn
Improves performance by tweaking mob despawn rules. Say bye to pesky unintentional persistent mobs.
25MSueta
JourneyMap
Real-time map used for mapping in-game or your browser as you explore.
14.7MSueta
Emotecraft
Create your own emotes in Minecraft.
7.5MSueta
Simple Tpa
A simple tpa plugin which sends requests
5.4MSueta
Common Network
Forge and Fabric Unified Networking Solution
3.9MSueta
Set Home
A lightweight plugin for players to set their homes.
3.8MSueta