Compatibility
Minecraft: Java Edition
1.21.x
1.20.x
1.19.x
1.18.x
1.17.x
1.16.x
Platforms
Links
Creators
Details
Licensed Apache-2.0
Published last year
Updated 2 months ago
ChunkEntityLimiter
High-Performance Entity & Item Limiter for Folia, Paper, Bukkit, Purpur, and Spigot.
This plugin optimizes server performance by intelligently limiting entity and item counts. It employs a dual-check system (Single Chunk Limit + Player Surrounding Chunks Limit) to prevent lag from mob farms or massive item drops, while ensuring important entities are protected.
Key Features
- Native Folia Support: Fully optimized for Folia's regional threading architecture.
- Smart Cleanup Logic: Oldest First. Entities are removed based on their generation time. The longest-living entities are removed first to preserve newly spawned mobs.
- Dual-Layer Limiting: Limits are applied to individual chunks and the aggregate group of chunks around a player.
- Precise Item Counting: Configurable option to count item stacks by their actual amount (e.g., a stack of 64 Cobblestone counts as 64, not 1).
- Granular Notifications: Separate controls for Cleanup Reports and Overload Warnings, with configurable scopes (None, OP only, or All Players nearby).
- Performance Monitoring: Built-in performance profiler to track cleanup phases.
Cleanup Logic
- Classification: Entities are categorized into "Protected" and "Removable".
- Protection Check: Protected entities (Named, Leashed, Tamed, Equipped, Bosses) are skipped unless
clean-protected-if-over-limitis enabled. - Sorting: Removable entities are sorted by Spawn Time.
- Execution: The plugin removes entities starting from the Earliest Generated (Oldest) until the count drops below the limit.
Commands & Permissions
Main Command: /chunklimit
Aliases: /cl, /climit
| Command | Description | Permission |
|---|---|---|
/chunklimit reload |
Reloads the configuration file. | chunklimiter.reload (default: op) |
/chunklimit stats |
Displays detailed entity statistics for the current chunk and surrounding radius. | chunklimiter.stats (default: true) |
/chunklimit notify [type] [scope] |
Set notification preferences. ⢠Type: report (Cleanup result) or warning (Near limit)⢠Scope: none (Off), op (Admins only), all (Everyone nearby)Example: /cl notify report op |
chunklimiter.notify (default: op) |
/chunklimit performance [reset] |
View performance metrics (execution time for classification, cleanup, etc.). | chunklimiter.performance (default: op) |
config.yml
# Entity and item drop limits configuration. It will only clear parts that exceed the limits.
# åŗåå®ä½ćęč½ē©éå¶é
ē½®ļ¼åŖä¼ęø
ēč¶
åŗēéØå
entity-limits:
# Default maximum number of entities allowed per chunk (all entities except those with special configurations)
# é»č®¤ęÆäøŖåŗåå
许ēę大å®ä½ę°éļ¼é¤ē¹ę®é
ē½®å¤ēęęå®ä½ļ¼
default-limit: 100
# Maximum number of item entities allowed (item drops)
# ē©åå®ä½ēę大ę°ééå¶ļ¼ęč½ē©ļ¼
item-limit: 300
# Check interval (in game ticks, 20 ticks = 1 second)
# Recommended: 600 (30s) or 1200 (60s) for performance
# ę£ę„é“éļ¼åä½ļ¼ęøøęå»ļ¼20 ticks = 1ē§ļ¼
# ęØč设置ļ¼600 (30ē§) ę 1200 (60ē§) 仄čēę§č½
check-interval-ticks: 600
# Whether to check chunks around the player. 0 means disabled.
# Example: If chunk-check-radius: 1, the total limit for all chunks (3x3) within radius 1 around the player is calculated.
# ęÆå¦å
å«ę£ę„ē©å®¶åØå“ēåŗåļ¼0蔨示ē¦ēØ
# ä¾å¦: 设置为 1 蔨示ę£ę„ē©å®¶åØå“ 3x3 ēåŗåčå“
chunk-check-radius: 2
# Multiplier for entity limits in chunks around the player.
# Example: If set to 1.5, the limit for chunks in the radius will be 1.5x the default limit.
# ē©å®¶åØå“ēåŗåå®ä½éå¶åę° (宽ę¾ē³»ę°)
# ä¾å¦: 设置为 1.5ļ¼ååØå“åŗåēå®ä½äøéęÆé»č®¤å¼ē 1.5 å
chunk_entity_multiplier: 1.5
# Multiplier for item entity limits in chunks around the player.
# ē©å®¶åØå“ēåŗåē©åå®ä½éå¶åę°
chunk_item_multiplier: 1.5
# Whether to count item stack amounts towards the limit
# If true, a stack of 64 items counts as 64. If false, it counts as 1 entity.
# ęÆå¦č®”ē®ē©åå å ę°é
# č„äøŗ trueļ¼äøē»64äøŖē©åē®ä½64ćč„äøŗ falseļ¼ē®ä½1äøŖå®ä½ć
count-item-stack-amount: false
# Ignored entity types (these will not be counted or cleared)
# åæ½ē„ēå®ä½ē±»åļ¼äøä¼č¢«č®”ę°åęø
ēļ¼
ignored-types:
- IRON_GOLEM # Iron Golem / éåå”
- VILLAGER # Villager / ęę°
# Ignored item types (these will not be counted or cleared)
# åæ½ē„ēē©åē±»åļ¼äøä¼č¢«č®”ę°åęø
ēļ¼
ignored-items:
- DIAMOND # Diamond / é»ē³
- NETHERITE_INGOT # Netherite Ingot / äøēåéé
- ENCHANTED_GOLDEN_APPLE # Enchanted Golden Apple / éééč¹ę
# Custom entity limits (override the default limits)
# čŖå®ä¹å®ä½éå¶ļ¼č¦ēé»č®¤éå¶ļ¼
custom-limits:
ZOMBIE: 200 # Maximum number of Zombies / åµå°øę大ę°é
CREEPER: 200 # Maximum number of Creepers / č¦åęę大ę°é
ZOMBIFIED_PIGLIN: 200 # Maximum number of Zombified Piglins / ēŖäŗŗę大ę°é
# Protection Settings, entities exceeding the limit will not be prioritized for cleaning, and protected entities exceeding the limit will still be cleaned up
# äæę¤č®¾ē½®ļ¼å®ä½č¶
čæéå¶ę¶äøä¼č¢«ä¼å
ęø
ēļ¼åäæę¤ēå®ä½ę°éč¶
čæéå¶ę¶ä»å°č¢«ęø
ē
protection:
# Protect entities with custom names
# äæę¤č¢«å½åēå®ä½
protect-named-entities: true
# Protect leashed mobs (horses/donkeys excluded by default)
# äæę¤č¢«ę“ä½ēå®ä½
protect-leashed-entities: true
# Prevent harming tamed pets (dogs/cats/parrots)
# äæę¤é©ÆęēåØē©
protect-tamed-animals: true
# Protect mobs wearing armor/items (including dropped gear)
# äæę¤ęč£
å¤ēå®ä½
protect-equipped-entities: true
# Prevent altering boss-type mobs (Ender Dragon, Wither, etc.)
# äæę¤Bosså®ä½
protect-boss-entities: true
# Notification settings
# éē„设置
settings:
# Whether to clean up protected entities when the limit is exceeded
# If true: Normal entities are removed first, then protected ones if still over limit.
# If false: Protected entities are never removed (but count towards the total).
# å½ę°éč¶
éę¶ļ¼ęÆå¦å¼ŗå¶ęø
ēåäæę¤ēå®ä½
# č„äøŗ trueļ¼å
ęø
ēę®éå®ä½ļ¼č„ä»č¶
éåęø
ēäæę¤å®ä½ć
# č„äøŗ falseļ¼åäæę¤å®ä½ę°øčæäøä¼č¢«ęø
ēļ¼ä½ä¼å ēØę°éåé¢ļ¼ć
clean-protected-if-over-limit: true
# Whether to enable global single chunk cleaning (Phase 1).
# If false: Skips global scan, only cleans chunks near players (Phase 2). Recommended false for Folia.
# ęÆå¦åÆēØå
Øå±ååŗåęø
ēļ¼é¶ę®µ1ļ¼ć
# č„äøŗ falseļ¼č·³čæå
Øå±ę«ęļ¼ä»
ęø
ēē©å®¶éčæēåŗåļ¼é¶ę®µ2ļ¼ćFolia 端建议设为 false 仄ęåę§č½ć
clean-all-loaded-chunks: true
# Notification scope for cleanup reports (when entities are removed)
# Options: NONE (disable), OP (admins only), ALL (all players in radius)
# ęø
ēę„åéē„čå“ļ¼å½å®ä½č¢«ęø
ēę¶ļ¼
# é锹: NONE (ē¦ēØ), OP (ä»
ē®”ēå), ALL (ęęē©å®¶)
cleanup-report-scope: ALL
# Notification scope for overload warnings (when nearing limit)
# Options: NONE (disable), OP (admins only), ALL (all players in radius)
# č¶
éé¢č¦éē„čå“ļ¼å½ę„čæäøéę¶ļ¼
# é锹: NONE (ē¦ēØ), OP (ä»
ē®”ēå), ALL (ęęē©å®¶)
overload-warning-scope: ALL
# Whether OPs should receive global notifications for cleanup reports
# If true: OPs receive reports from all chunks. If false: OPs must be nearby.
# ęÆå¦åOPåéå
Øå±ęø
ēę„åéē„ļ¼å
Øę广ęē»OPļ¼
# č„äøŗ trueļ¼OP ę„ę¶ęęåŗåēę„åćč„äøŗ falseļ¼OP åæ
é”»åØéčæć
op-global-cleanup-report: true
# Whether OPs should receive global notifications for overload warnings
# If true: OPs receive warnings from all chunks. If false: OPs must be nearby.
# ęÆå¦åOPåéå
Øå±č¶
éé¢č¦éē„ļ¼å
Øę广ęē»OPļ¼
# č„äøŗ trueļ¼OP ę„ę¶ęęåŗåēé¢č¦ćč„äøŗ falseļ¼OP åæ
é”»åØéčæć
op-global-overload-warning: false
# Whether to send cleanup reports to the server console
# ęÆå¦å°ęø
ēę„ååéå°ęå”åØę§å¶å°
console-cleanup-report: true
# Warning notification percentage (0-100).
# é¢č¦éē„ē¾åęÆļ¼0-100ļ¼
notify-threshold: 90
# Warning cooldown time, in seconds
# é¢č¦å·å“ę¶é“ļ¼åä½ē§
notify-cooldown: 10
# Player notification scope radius
# ē©å®¶éē„čå“åå¾
notification-radius: 128.0
# Set to true to enable performance monitoring
# 设为 true åÆēØę§č½ēę§
performance-monitoring: false
# Set to true to enable debug mode (verbose logging)
# 设为 true åÆēØč°čÆęØ”å¼ļ¼čƦē»ę„åæļ¼
debug-mode: false
# Language option (en/zh)
# čÆčØé锹ļ¼en/zhļ¼
language: en



