ChunkSpawnerLimiter
Limits entities & blocks in chunks.
Features
- Limit any entity per chunk.
- Limit any block per chunk. (Disabled by default, enable in blocks.yml)
- Notify players when a limit has been reached via in-game messages or titles.
- Configurable messages & titles
- Check limits with any spawn reason: Mob spawn from portal? No problem. A player built an iron golem, sure!
- Preserve unique entities (named, special meta data)
- Exclude worlds from being checked by CSL.
- Pre-made mob groups: Want to limit all animals? Just use the "ANIMAL" group. (Custom groups coming soon)
- Modded blocks & entities coming soon.
Commands & Permissions
- /cslreload or /csl reload - Reloads the config.
- Permission: csl.reload
- /cslinfo or /csl info - Shows the current spawn reasons & entity limits.
- Permission: csl.info
- /cslsettings or /csl settings - Shows the current settings & messages.
- Permission: csl.settings
📹 Featured Videos
Here are some community-made tutorials and showcases:
Spanish Showcase:
Video by BeanHosting Oficial
Thank you Cyprias for making the original version of this plugin.
How to Install ChunkSpawnerLimiter (Plugin)
ChunkSpawnerLimiter by sarhatabaot is verified for Bukkit, Paper, Purpur, Spigot across Minecraft versions 1.10, 1.10.1, 1.10.2, 1.11, 1.11.1, 1.11.2, 1.12, 1.12.1 (latest release: 5.1.0, file size: 177 KB). Follow the steps below to install it safely from ModCraft.tv:
- Click the Download button above and select your Minecraft version (1.10, 1.10.1, 1.10.2, 1.11, 1.11.1, 1.11.2, 1.12, 1.12.1) and platform (Bukkit, Paper, Purpur, Spigot).
- Make sure you have the compatible loader or environment installed for Bukkit, Paper, Purpur, Spigot.
- Move the downloaded ChunkSpawnerLimiter file into your Minecraft
.minecraft/pluginsfolder and launch the game.
All Versions
+ Add Version- Add real Paper integration and stress tests through WatchWolf.
- Add nightly prereleases and automatic shaded-jar attachment for stable releases.
- Rebuild loaded chunk state when configuration reloads; honor enablement and inspection settings.
## 🛠 Bug Fixes
- Correct entity removal accounting, player protection, deferred prevention, portal handling, and transform tracking.
- Validate and normalize configuration names and limits.
- Bound chunk inspections and entity tracking; replace unsafe scanners with snapshot-based scanning.
## 👒 Dependencies
- Move the build and CI to Java 21 and update Gradle and build dependencies.
## Validation
- The release range adds unit, legacy, and WatchWolf coverage.
- Real Paper reload cleanup still needs confirmation after the test’s chunk-loading fix.
- Fixed [GH-104](https://github.com/sarhatabaot/ChunkSpawnerLimiter/issues/104) - Console spam when using spawn eggs.
## Requirements
- Java 21+
- Minecraft 1.8.8 → 1.21.10
## Core Rewrite & Architecture
- Complete internal rewrite of CSL
- Major performance improvements across all systems
- Automatic Minecraft version detection for proper CraftBukkit/NMS handling
- Automatic world size detection — no manual configuration required
- Cached world lists in config (O(n) → O(1) access)
- Significant performance improvements in
PluginConfig
## Configuration Changes
- New unified configuration system
config.ymlandblocks.ymlmerged- Removed obsolete options and added new ones
- Stronger, more sensible defaults
https://github.com/sarhatabaot/ChunkSpawnerLimiter/blob/5.0.0/src/main/resources/config.yml
- Optional entity group overrides via config
- Improved world enable/disable logic (exclude vs excluded handling fixed)
- Configurable periodic chunk inspection (default: every 60 seconds)
## Entity Handling & Enforcement
- New
modesystem replacingkill-instead-of-remove
### Available Modes
enforce(default, recommended) – prevent spawn + remove excessenforce-kill– prevent spawn + kill excessprevent– prevent spawn if limit is reached (CreatureSpawnEvent)kill– kill excess entitiesremove– remove excess entities
- Automatic player killing when limits are exceeded (configurable)
- Spawn eggs are returned to players if consumed while a limit is already reached
- Improved entity/block removal logic
- Player notification system for chunk limit violations
## Testing & Quality Assurance
- Major test suite expansion
- Separate test suites for:
- Legacy versions (1.8–1.12)
- Modern versions (1.17+)
- Unit tests
- Improved concurrent testing stability
- Fixed race conditions and resource leaks
- Resolved missing dependencies and classpath issues
## Technical Improvements
- Complete NMS Block Scanner rewrite
- Improved version compatibility and reliability
- Enhanced debug logging for NMS initialization
- Major performance fix for chunk unload handling
## Bug Fixes
- Fixed CraftBukkit package detection (
v1_20_R1, etc.) - Fixed world filtering logic (
isWorldDisabled) - Fixed bad performance on chunk unload
- Fixed concurrent test race conditions
- Fixed test compilation and dependency issues
## Build & Dependencies
- Added Adventure API, bStats, and correct API versions for tests
- Streamlined Gradle build configuration
- Improved shadow JAR relocation for better library compatibility
## Upcoming (Post-5.0.0)
- Optional third-party region support (non-chunk based), low priority (5.1.0)
- Advanced per-entity preservation logic
- Fixed bad performance on chunk unload.
- Eggs should be returned to players on consumption if limit was reached.
- Cached world list in config (O(n) per access → O(1) per access)
Improved performance in regards to the blocks & entities features. Please report any issues on the discord, as I'm still testing performance issues.
# Changelog: v5.0.0-RC3 to v5.0.0-RC4
## 🧪 **Testing & Quality Assurance**
- Comprehensive test suite expansion** - Added extensive unit and integration tests across multiple Minecraft versions
- Multi-version test support** - Implemented separate test suites for legacy (1.8-1.12), modern (1.17+), and unit tests
- Test framework improvements** - Enhanced concurrent testing, fixed race conditions, and improved resource management
## 🔧 **Technical Improvements**
- NMS Block Scanner overhaul** - Complete rewrite of the block scanning system with better version compatibility
- Version detection system** - Added automatic Minecraft version detection for proper CraftBukkit package handling
- Debug logging enhancement** - Added detailed logging for troubleshooting NMS initialization issues
## 🐛 **Bug Fixes**
- CraftBukkit package detection** - Fixed ModernNmsScanner to properly detect versioned CraftBukkit packages (v1_20_R1, etc.)
- World filtering logic** - Corrected
isWorldDisabled()method to properly handle "excluded" vs "exclude" mode checking - Test compilation issues** - Resolved missing dependencies and classpath problems across all test suites
- Concurrent test race conditions** - Fixed thread safety issues in test execution
## 📦 **Dependencies & Build**
- Test dependencies** - Added adventure API, bStats, and proper API versions for all test configurations
- Gradle configuration** - Streamlined build process with proper test suite organization
- Library relocation** - Improved shadow jar configuration for library compatibility
## 🎯 **Configuration & Features**
- Notification system** - Added player notification features for chunk limit violations
- Inspection frequency** - Configurable periodic chunk inspection (default: every 60 seconds)
- World filtering** - Enhanced world enable/disable functionality
- Removal modes** - Improved entity/block removal logic and player kill options
5.0.0 is a complete re-write of CSL.
- Java 21+ Required
- New config (Merged config.yml + blocks.yml)
- Removed some options & added new ones
- More powerful defaults. See it here: https://github.com/sarhatabaot/ChunkSpawnerLimiter/blob/5.0.0/src/main/resources/config.yml
- 1.8.8 -> 1.21.10 Support
- Automatic world size detection, no need to set in config.
- Overriding entity groups in config (optional).
- Better performance (finally)
- Automatically kill players if a limit has been reached.
- Replaced kill-instead-of-remove with a new "mode" setting:
- Options: enforce (default - recommended), enforce-kill, prevent, kill, remove
prevent -> don't spawn the mob if the limit is reached (using CreatureSpawnEvent)
enforce -> prevent+remove
enforce-kill -> prevent+kill
#### Upcoming Features
- Possible third party region support instead of chunks (later, low priority, 5.1.0)
- Advanced per entity preservation
https://github.com/sarhatabaot/ChunkSpawnerLimiter/releases/tag/v5.0.0-RC1
- Fixed an NPE [GH-#89](https://github.com/sarhatabaot/ChunkSpawnerLimiter/issues/89).
- Code cleanup & optimizations.
- Fixes an issue where an illegal state is triggered.
[https://github.com/sarhatabaot/ChunkSpawnerLimiter/releases/tag/v4.4.2](https://github.com/sarhatabaot/ChunkSpawnerLimiter/releases/tag/v4.4.2)
- Better Task cancelling by @PanSzelescik in https://github.com/sarhatabaot/ChunkSpawnerLimiter/pull/84
- Moved entity limit calculations to an async task to prevent server lag during chunk inspections.
## Blocks Feature
- Faster Checks – High-limit blocks (like stone/dirt) now use a cache system for instant checks.
- Accurate Limits – Low-limit blocks (like spawners) still scan chunks to ensure precision.
- Reduced Lag – Cache automatically clears when chunks unload or blocks break.
### Config & More debug
- Config option – Adjust
cache.min-limit-for-cache: 50 in blocks.yml to balance speed/accuracy. - More debug logs.
- Moved entity limit calculations to an async task to prevent server lag during chunk inspections.
## Blocks Feature
- Faster Checks – High-limit blocks (like stone/dirt) now use a cache system for instant checks.
- Accurate Limits – Low-limit blocks (like spawners) still scan chunks to ensure precision.
- Reduced Lag – Cache automatically clears when chunks unload or blocks break.
### Config & More debug
- Config option – Adjust
cache.min-limit-for-cache: 50 in blocks.yml to balance speed/accuracy. - More debug logs.
- Probably fixes [#74](https://github.com/sarhatabaot/ChunkSpawnerLimiter/issues/74)
- Some performance improvements
- If there is a problem with the material name in blocks.yml it'll log it in the console.
- General code cleanup and refactors.
- Changed blocks.yml worlds path, it's now:
yml
worlds:
world_nether:
min-y: 0
max-y: 128
``- Added 1.21.4 Support
See full changelog at: [https://github.com/sarhatabaot/ChunkSpawnerLimiter/releases/tag/v4.3.11](https://github.com/sarhatabaot/ChunkSpawnerLimiter/releases/tag/v4.3.11)
- Update NBT-API to support 1.21.3
- Minor optimizations & documentation additions.
Full changelog at [https://github.com/sarhatabaot/ChunkSpawnerLimiter/releases/tag/v4.3.10](https://github.com/sarhatabaot/ChunkSpawnerLimiter/releases/tag/v4.3.10)
