Overview
EntityLimiter is a lightweight, high-performance Bukkit plugin that monitors and controls entity counts within each chunk of your Minecraft server. By preventing entity buildup in specific areas, this plugin effectively eliminates lag caused by entity overcrowding while maintaining smooth gameplay. Supports Folia!Key Features
- Folia Support: Now supports Folia for increased stability and performance
- Radius-Based Entity Limiting: Define maximum allowed entities per type in each radius of 16 blocks (configurable)
- Smart Entity Tracking: Asynchronous position monitoring with minimal performance impact
- Entity Type Filtering: Configure exactly which entities to limit (defaults to minecarts and dropped items)
- Dynamic Movement Handling: Intelligently manages entities as they move between chunks
- Thread-Safe Design: Built for stability on high-traffic servers
- Performance Optimized: Uses direct chunk coordinate tracking to prevent unnecessary chunk loading
- Real-Time Statistics: Monitor plugin performance with built-in command
- Fully Configurable: Easy-to-use configuration with per-entity type limit.
Commands
- /entitylimiter - Shows plugin status, tracking statistics, and recent entity removals
Permissions
- entitylimiter.admin - Access to the EntityLimiter command (Default: OP)
View attachment image-4.1177125
Technical Details
Optimized Chunk Handling
Most entity-limiting plugins cause more lag than they solve by constantly loading and unloading chunks. EntityLimiter uses a more efficient approach:- Direct chunk coordinate calculation without loading chunks
- Thread-safe concurrent hash maps for entity tracking
- Asynchronous position monitoring with minimal overhead
- Synchronized entity removal only when necessary
Smart Memory Management
The plugin automatically cleans up after itself:- Entities are untracked when they despawn or die
- Empty collections are removed from memory
- Removals are logged efficiently with configurable history size
Perfect For
- Survival servers with item-heavy farms
- Economy servers with many dropped items
- Creative servers with redstone and minecart systems
- Any server experiencing entity-related lag
Installation
- Download the plugin
- Place in your plugins folder
- Start/restart your server
- Edit the configuration (optional)
- Enjoy lag-free gameplay!
Configuration
Spoiler: config.ymlYAML:
Code:
# Made with love by LinsaFTW
# More plugins: https://builtbybit.com/creators/linsaftw.152552/
# How often to check entity positions (in ticks)
# Lower values mean faster detection but higher CPU usage.
# 20 ticks = 1 second.
update-rate: 20
# Radius (in blocks) around each entity to monitor for limits.
# The plugin checks for entities within this 3D radius to apply limits.
radius: 16
# Debug mode - when true, logs detailed information about entity removals to the console.
debug: false
# Entities in the specified world(s) will not be affected by the plugin.
exempt-worlds:
- lobby
- spawn
# Settings for particles when entities get removed.
particle-settings:
# The plugin will try these particle names in order.
# If the first one doesn't exist on the server version, it tries the next.
particle:
- SMOKE_NORMAL
- EXPLOSION_NORMAL
- CLOUD
count: 5
offsetX: 0.5
offsetY: 0.5
offsetZ: 0.5
extra: 0
# Entity limits per group or specific type.
# Format: ENTITY_TYPE: limit
# You can use specific entity names (ZOMBIE, COW) or Groups (MONSTERS, ANIMALS, MINECARTS).
# Reference: https://hub.spigotmc.org/javadocs/bukkit/org/bukkit/entity/EntityType.html
chunk-limits:
# Fallback limit for any entity not specifically listed below.
DEFAULT: 32
# --- Groups ---
# Limits total number of entities belonging to these categories.
# Minecarts (Includes Chest, Hopper, TNT, Command, etc.)
MINECARTS: 4
# Monsters (Zombies, Skeletons, Creepers, etc.)
MONSTERS: 32
# Animals (Cows, Pigs, Sheep, etc.)
ANIMALS: 32
# Projectiles (Arrows, Fireballs, etc.)
PROJECTILES: 16
# Boats (All wood types)
BOATS: 5
# --- Specific Limits ---
# These apply in addition to group limits.
# Example: You can have 32 MONSTERS total, but only 16 of them can be ZOMBIES.
# Common Mobs
ZOMBIE: 16
SKELETON: 16
COW: 16
SHEEP: 16
# Items / Decorations
DROPPED_ITEM: 64
ITEM: 64
ARMOR_STAND: 16
ITEM_FRAME: 256
PAINTING: 128
END_CRYSTAL: 2
# Modern Entities (Will be ignored on 1.8 automatically)
GLOW_ITEM_FRAME: 128
AXOLOTL: 10
BEE: 10