XAntiLag v1.0.8

Boost your TPS: stack items and mobs, cap chunk entities, redstone clock.. Paper & Folia compatible.
xantilag.png


XAntiLag
Complete Server Optimization Suite

Built on XCore — The modular Minecraft server framework

━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━

⚡ Why XAntiLag?

XAntiLag is an all-in-one server optimization addon that tackles the most common performance problems: chunk entity/block limits, mob & item stacking, anti-AFK enforcement, villager optimization, hopper rate limiting, entity collision reduction, redstone clock detection, clearlag scheduling, distance-based mob AI reduction, spawn rate limiting, farmland optimization, TPS monitoring with gradual levels, anti-chunkloader detection, TNT rate limiting, and a web dashboard — all in a single, lightweight package.

━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━

📦 Chunk Limiter

  • Per-block limits — Set maximum count per chunk for any block type (hoppers, pistons, TNT, observers, etc.)
  • Per-entity limits — Set maximum count per chunk for any entity type (zombies, cows, item frames, etc.)
  • Tile entity limiter — Global cap on tile entities per chunk (chests, hoppers, signs, etc.)
  • Async scanning — Chunks scanned asynchronously with Caffeine caching (2h TTL)
  • Full event coverage — BlockPlace, BlockBreak, BlockBurn, Piston, Explosion, Ignite, CreatureSpawn, HangingPlace, VehicleCreate
  • Cross-chunk pistons — Tracks blocks moving between chunks via pistons
  • Auto-cleanup — Background task removes excess entities every 5 minutes
  • Anti-spam messages — Players don't get spammed when repeatedly hitting limits

🐄 Mob Stacker

  • Automatic stacking — Identical mobs within 6 blocks merge into a single entity with a count label
  • Drop multiplication — Death drops and XP multiplied by stack count
  • Cooked drops — Food drops are automatically converted to cooked variants when killed by fire
  • Slime handling — Stacked slimes don't split on death, preventing lag
  • Kill one-by-one mode — Optional: killing removes one from the stack and respawns the rest
  • Vanilla loot tables — Uses Minecraft's built-in loot tables for accurate drop generation
  • Configurable display — Customize stack label format with MiniMessage (e.g. <red>x%count%)
  • Exclude named mobs — Optionally skip mobs with custom names
  • Exclude specific types — Configurable entity type exclusion list (Villagers, Ender Dragon, Wither, etc.)

📦 Item Stacker

  • Automatic merging — Dropped items within 6 blocks merge with count label
  • Overflow handling — Smart inventory management: excess items stay on the ground
  • Hopper pickup — Proper handling when hoppers pick up stacked items
  • Meta comparison — Only stacks items with identical metadata (enchants, colors, etc.)
  • Configurable display — Customize stack label format with MiniMessage (e.g. <aqua>x%count%)
  • Exclude named items — Optionally skip items with custom display names
  • Configurable pickup delay — Control how soon stacked items can be picked up

💤 Anti-AFK System

  • Configurable timeout — Set how long before a player is marked AFK (default: 300s)
  • Visual effects — Blindness + Darkness applied to AFK players
  • AFK title — Customizable title message shown to AFK players
  • Custom distances — Reduce view/simulation distance for AFK players to save resources
  • AFK teleport — Optionally teleport AFK players to a designated location
  • Activity detection — Resets on movement, interaction, chat, commands, inventory clicks
  • Per-player distances — Set custom view/simulation distance on join (normal and AFK modes)

🧠 Custom Mob AI

  • Pathfinding reduction — Reduce mob pathfinding calculations by configurable percentage (default: 80%)
  • Distance-based scaling — Mobs far from players get maximum AI reduction, nearby mobs keep normal behavior
  • Speed reduction — Lower mob movement speed (default: 0.7x)
  • Disable player attacks — Optionally prevent mobs from targeting players
  • Exclude specific types — Configurable entity type exclusion list
  • Applied on spawn & chunk load — Ensures all mobs are affected

🏘️ Villager Optimizer

  • Distance-based AI — Disables AI awareness for villagers far from players (default: 32 blocks)
  • Auto-restore — Villagers regain full AI when a player approaches
  • Periodic check — Efficient 5-second scan interval
  • Massive impact — Villager pathfinding is the #1 cause of lag on most servers

⚙️ Hopper Rate Limiter

  • Transfer rate cap — Limits item transfers per hopper per second (default: 8/sec)
  • Chain lag prevention — Prevents massive hopper sorting systems from tanking TPS
  • Per-hopper tracking — Each hopper tracked independently
  • Zero config — Works out of the box with sensible defaults

💥 Entity Collision Limiter

  • Disable mob collisions — Non-player entities have collision disabled on spawn
  • Reduce overhead — Significant performance gain in high-density mob farms
  • Player-safe — Player collisions are unaffected

⚡ Redstone Clock Limiter

  • Tick rate detection — Monitors repeater/comparator updates per 10-second window
  • Configurable threshold — Default: 7 ticks/second (70 per window)
  • Per-chunk rate limit — Global cap on total redstone updates per chunk per second
  • Auto-break — Violating blocks replaced with warning sign
  • Console logging — Coordinates and tick rate logged for server admins

🧹 Clearlag

  • Scheduled cleanup — Automatic entity removal at configurable intervals (default: 15 minutes)
  • Configurable warnings — Set any number of warning times before cleanup (default: 60s, 20s)
  • Translatable messages — All messages in lang.yml with {time} and {count} placeholders
  • Sound effects — Configurable sounds for warnings and cleanup
  • Entity type filter — Choose which entity types to clear (items, arrows, XP orbs, etc.)
  • Kill monsters — Optional: also remove hostile mobs during cleanup
  • Exclude named entities — Optionally skip entities with custom names
  • Stack-aware — Recognizes stacked items/mobs and handles them properly

🚫 Spawn Rate Limiter

  • Global rate control — Reduce natural mob spawn rates by percentage (e.g. 50% = half as many mobs)
  • Per-world filtering — Apply to specific worlds or all worlds
  • TPS integration — Automatically reduces further when TPS monitor detects low TPS
  • Uses ThreadLocalRandom — Efficient random cancellation with no contention

🌾 Farmland Optimizer

  • Crop density detection — Counts crops per chunk (wheat, carrots, potatoes, beetroots, nether wart, sweet berries)
  • Configurable threshold — Optimization kicks in when crops exceed threshold (default: 64)
  • Random tick skipping — Cancels a percentage of growth events to reduce lag
  • Early exit optimization — Stops counting crops once threshold is exceeded

📊 TPS Monitor

  • Gradual optimization levels — Multiple thresholds with different actions
  • Example setup — 18 TPS: reduce spawn rate | 16 TPS: reduce distances | 14 TPS: force clearlag
  • Configurable check interval — How often to check TPS (default: 5 seconds)
  • View distance reduction — Automatically reduces view distance for all players
  • Simulation distance reduction — Automatically reduces simulation distance
  • Emergency clearlag — Triggers an immediate clearlag when TPS drops critically
  • Spawn rate reduction — Reduces mob spawn rate via spawn limiter integration
  • Auto-recovery — Restores normal settings when TPS recovers above all thresholds

🔗 Anti Chunk-Loader

  • Portal exploit detection — Detects entities repeatedly entering portals without players nearby
  • Smart flagging — Requires multiple flags before taking action to reduce false positives
  • Configurable action — Remove the exploiting entity or just log a warning
  • Named entity focus — Targets named/persistent entities (common in exploits)

💥 TNT Rate Limiter

  • Per-chunk limiting — Limits TNT and TNT minecart explosions per chunk per second
  • Configurable cap — Default: 5 explosions per chunk per second
  • Caffeine cache — Uses 1-second TTL cache for efficient tracking
  • Lag prevention — Prevents TNT cannon/bomb lag without disabling TNT entirely

🌐 Web Dashboard

  • REST API — JSON endpoints for monitoring optimization status remotely
  • Server status — TPS, entity count, loaded chunks, online players, feature toggles
  • Chunk profiler — Top 10 most expensive chunks with entity/tile/redstone breakdown
  • Stats endpoint — Clearlag timing, stacker configuration
  • Rate limiting — 30 requests per minute per IP
  • Token auth — Secured with XCore web dashboard token

📈 Chunk Profiler

  • GUI/chunks opens an inventory listing every loaded chunk with full breakdown
  • Sort by cost/chunks top reuses the same GUI but ordered by descending cost so the laggiest chunks surface first
  • Cost formula — Entities × 1 + Tile entities × 2 + Redstone × 0.5
  • Per-chunk — World, coords, total entities, total tile entities, redstone components, plus the top 5 entity types and top 5 tile types
  • Click to teleport — Left-click any chunk entry to teleport to its center (Folia region-safe via getHighestBlockYAt on the owning region thread)


━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━

📝 Commands

Code:
/chunks                  — Paginated GUI of every loaded chunk with full details
/chunks top              — Same GUI sorted by descending cost
/setafklocation          — Set the AFK teleport location
/xantilag reload         — Reload configuration
/xantilag status         — Show all feature statuses


━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━

🪧 PlaceholderAPI

Code:
%xantilag_afk%        — Returns "(AFK) " if the player is AFK, empty otherwise
%xantilag_isAfk%      — Returns "yes" or "no"
%xantilag_clearlag%   — Time remaining until next clearlag


━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━

🔑 Permissions

Code:
xantilag.command.chunks           — Access /chunks and /chunks top commands
xantilag.command.setafklocation   — Set AFK teleport location
xantilag.admin                    — Reload and status commands


━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━

📦 Requirements


Paper 1.21.1+ (Folia compatible)
Java 21+
XCore (framework)
PlaceholderAPI (optional)



━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━

📥 Installation


1. Place XCore.jar in plugins/
2. Place XAntiLag.jar in plugins/XCore/addons/
3. Start the server
4. Configure plugins/XCore/addons/XAntiLag/config.yml
5. Adjust limits, stacker settings, and AFK thresholds to your needs



━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━

🔗 Links


📖 Documentation
💬 Discord
🌐 Website



━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━

📸 Screenshots

Capture d'écran 2026-04-28 155618.png


━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━

Made with ❤️ by Xyness

Latest reviews

comme tout les plugins de xyness, marche nickel, support hyper réactif, agréable, marche très bien

je conseille fortement :)
mercii
Xyness
Xyness
Merci !
Best Plugin i ever saw. Fast Supporter good Plugin everying is Perfect :D
Xyness
Xyness
Thanks a lot i appreciate it <3
Buy a license now
$9.99
EULA
Standard EULA
Use on any projects you own with attribution
Support
Standard
Includes:
Download the resource
Access new updates
Support from the creator
Support duration
Lifetime
Share and earn
Refer this resource and earn a 10% commission.
407 Views
8 Purchases
9 Downloads
Apr 29, 2026 Published
May 28, 2026 Updated
5.00 star(s)
Average rating (2)
1.5 MB File size
Open source
  1. No
DRM-free
  1. No
Unobfuscated
  1. Yes
Type
  1. World
  1. Staff
  1. Optimization
Game mode
  1. Survival
  1. Factions
  1. Skyblock
Supported software
  1. Paper
  1. Folia
  1. Purpur
Supported versions
  1. 26.1
  1. 1.21.11
  1. 1.21.8
  1. 1.21.5
  1. 1.21.4
  1. 1.21.2
  1. 1.21
Supported languages
  1. English
Creator
Owner
Struggling to cover the costs of your server? Set up your own webstore with Tebex in under 30 seconds.
Lag-free, customizable servers ready in minutes.
Host your adventure today!
Recommended for you
Full claim system for 1.21+ servers - Fully configurable - Folia & Bedrock supported!
5.00 star(s) 14 ratings
67 purchases
The most advanced ban management & AI-powered moderation plugin for Paper/Folia servers.
5.00 star(s) 1 ratings
4 purchases
Auction house addon for XCore with fixed-price listings, live bidding auctions, and multi-currency
5.00 star(s) 1 ratings
4 purchases
All-in-one server announcements & live displays, fully MiniMessage & PlaceholderAPI driven.
Not yet rated
0 purchases
Stackable, fully-managed spawners, ownership, protection, Vault upgrades, holograms and admin GUIs
Not yet rated
0 purchases
Share and earn
Refer this resource and earn a 10% commission.
407 Views
8 Purchases
9 Downloads
Apr 29, 2026 Published
May 28, 2026 Updated
5.00 star(s)
Average rating (2)
1.5 MB File size
Open source
  1. No
DRM-free
  1. No
Unobfuscated
  1. Yes
Type
  1. World
  1. Staff
  1. Optimization
Game mode
  1. Survival
  1. Factions
  1. Skyblock
Supported software
  1. Paper
  1. Folia
  1. Purpur
Supported versions
  1. 26.1
  1. 1.21.11
  1. 1.21.8
  1. 1.21.5
  1. 1.21.4
  1. 1.21.2
  1. 1.21
Supported languages
  1. English
Creator
Owner
Struggling to cover the costs of your server? Set up your own webstore with Tebex in under 30 seconds.
Lag-free, customizable servers ready in minutes.
Host your adventure today!
Recommended for you
Full claim system for 1.21+ servers - Fully configurable - Folia & Bedrock supported!
5.00 star(s) 14 ratings
67 purchases
The most advanced ban management & AI-powered moderation plugin for Paper/Folia servers.
5.00 star(s) 1 ratings
4 purchases
Auction house addon for XCore with fixed-price listings, live bidding auctions, and multi-currency
5.00 star(s) 1 ratings
4 purchases
All-in-one server announcements & live displays, fully MiniMessage & PlaceholderAPI driven.
Not yet rated
0 purchases
Stackable, fully-managed spawners, ownership, protection, Vault upgrades, holograms and admin GUIs
Not yet rated
0 purchases
Top