Compatibility
Minecraft: Java Edition
1.21.x
1.20.x
1.19.x
1.18.x
1.17.x
1.16.x
1.15.x
1.14.x
1.13.x
Platforms
75% of ad revenue goes to creators
Support creators and Modrinth ad-free with Modrinth+Creators
Details
Licensed MIT
Published 11 months ago
Updated 5 days ago
LagFixer is the ultimate performance boosting Minecraft plugin designed to optimize your server and eliminate unnecessary lag. By fine-tuning various server aspects and streamlining redundant features, LagFixer ensures a smoother and more enjoyable gameplay experience for all players.
Requirements:
- Java 8 or later
- Server version 1.13 - 1.21.5
Supported versions:
- 1.16.5, 1.17.1, 1.18.2, 1.19.4, 1.20-1.21.5
- Most modules run on a wider range of versions [1.16.5 - 1.21.5]
- Forge based spigot forks: Mohist, Arclight etc.
Supported plugins
Placeholders
- %lagfixer_tps% - Current ticks per second
- %lagfixer_mspt% - Current miliseconds per tick
- %lagfixer_cpuprocess% - Current process cpu usage
- %lagfixer_cpusystem% - Current system cpu usage
- %lagfixer_worldcleaner% - Countdown to world clean
Commands
- /lagfixer - main plugin command
- /abyss - the place where deleted items go
Config
#░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░
#░██╗░░░░░░█████╗░░██████╗░░░███████╗██╗██╗░░██╗███████╗██████╗░░
#░██║░░░░░██╔══██╗██╔════╝░░░██╔════╝██║╚██╗██╔╝██╔════╝██╔══██╗░
#░██║░░░░░███████║██║░░██╗░░░█████╗░░██║░╚███╔╝░█████╗░░██████╔╝░
#░██║░░░░░██╔══██║██║░░╚██╗░░██╔══╝░░██║░██╔██╗░██╔══╝░░██╔══██╗░
#░███████╗██║░░██║╚██████╔╝░░██║░░░░░██║██╔╝╚██╗███████╗██║░░██║░
#░╚══════╝╚═╝░░╚═╝░╚═════╝░░░╚═╝░░░░░╚═╝╚═╝░░╚═╝╚══════╝╚═╝░░╚═╝░
#░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░
# Some of the options below require a server restart or plugin reload.
main:
prefix: "&8[&e&l⚡&8] "
prefix_hover: true # Displays LagFixer version info on hover.
threads: 1 # Multithread synchronization has not been thoroughly tested.
monitor_interval: 5 # Update interval (in seconds) for TPS, MSPT, CPU, and other metrics.
map_interval: 3 # Update interval (in seconds) for the map handler (/lagfixer map). Recommended to be at least twice the monitor_interval.
errors_reporter: true # Automatically reports LagFixer and Spark profiler errors to our support team.
updater: true
warnings: true # Displays warnings for legacy methods without support.
bStats: true # Optimized metrics available at https://bstats.org/plugin/bukkit/LagFixer/19292.
command:
permission: "lagfixer.command"
aliases:
- lf
- antilag
- lag
modules:
# A server restart is required to apply changes.
MobAiReducer:
enabled: true
worlds: # Use '*' to enable for all worlds.
- '*'
values:
collides: true # Disabling this may break bow arrow functionality.
silent: true # Disables audio packets, improving performance for large farms.
async: true
force_load: false # Overwrites entity AI on plugin reload.
click_event: true # Sends info when a player clicks on a creature (disabled by the developer).
# Entities that will have their mob AI and pathfinder system replaced.
entities:
animals: true
monsters: true
villagers: true
tameable: false # Pets (e.g., wolves, horses, cats, llamas, parrots). Enabling may cause issues.
birds: false # Flying entities (e.g., bees, parrots).
others: true
# List of ignored creatures. Entity types: https://hub.spigotmc.org/javadocs/bukkit/org/bukkit/entity/EntityType.html
# Use an empty list ([]) to disable the blacklist.
blacklist:
- WOLF
- MOOSHROOM
- IRON_GOLEM
pathfinder:
# Keep MobChip pathfinders wrapper (only for 1.17+ servers, untested).
mobchip: false
# Keep only dedicated pathfinders for mobs.
typeA:
enabled: true
whitelist: # Do not modify unless you are a developer.
- AttackableTarget
- HurtByTarget
- Attack
- BowShoot
- Swell
- EatTile
- FishSchool
# - AvoidTarget
# - RestrictSun
# - FleeSun
# Remove unnecessary random movements that cause server load.
typeB:
enabled: false
blacklist: # Do not modify unless you are a developer.
- Random
- LookAt
- Panic
- AvoidTarget
- MoveTowards
# - Float
# - FollowParent
# - MoveThroughVillage
# Clear all existing pathfinders (not recommended).
typeC:
enabled: false
animals:
tempt:
enabled: true
range: 5.0 # Player search range.
speed: 1.25 # Movement speed.
cooldown: 30 # Player search cooldown (in ticks).
villagers: true # Villagers follow players holding emeralds.
trigger_both_hands: true # If false, only the main hand is checked.
event: false # Calls EntityTargetEvent with Reason: Tempt.
teleport: false # Not recommended.
breed:
enabled: true
range: 5.0 # Partner search range.
speed: 1.0 # Movement speed.
event: false # Calls EntityTargetEvent with Reason: Custom.
teleport: false # Not recommended.
panic:
enabled: true
rangeFromPlayer: 7 # Required distance from the attacker to activate.
speed: 1.95
cooldown: 15
# A server restart is required to apply changes.
# Optimizes collisions by replacing them with new, optimized objects.
VehicleMotionReducer:
enabled: true
worlds: # Use '*' to enable for all worlds.
- '*'
values:
minecart:
enabled: true
remove_chest: false # Removes naturally generated minecarts, useful for servers with frequent chunk generation.
boat:
enabled: true
# Coming soon:
# silent: true # Disables audio packets, improving performance for large farms.
# max_speed: 8 # Default max speed in Minecraft is 8.
# physics: true # If false, vehicles may fall out of the world when not on water. May be fixed in the future.
# culling: false
# collides: false
LagMonitor:
enabled: true
worlds: # Use '*' to enable for all worlds.
- world
- world_the_end
- world_nether
values:
needed_mspt: 75 # If MSPT exceeds this value, LagFixer will apply the following settings.
during_lags:
simulation_distance: 2 # Must be between 2-32. Set lower than the server's default.
view_distance: 2 # Must be between 2-32. Set lower than the server's default.
disable:
entity_spawn: true
tick_hopper: true
redstone: false
projectiles: false
leaves_decay: true
mobai: false
liquid_flow: true
random_tick_speed: true
view_distance: false
simulation_distance: true
ConsoleFilter:
enabled: false
values:
logs_limit: 10 # Maximum logs saved in "/logs" directory. Use -1 to disable.
filter:
enabled: false
save_filtered: true
error_filtering: false
patterns:
- '^<(([A-Za-z0-9_]{3,16}))> (.{0,})' # Filters chat messages.
- '^/([0-9]{1,3})\.([0-9]{1,3})\.([0-9]{1,3})\.([0-9]{1,3})\:([0-9]{1,5}) lost connection' # Filters "lost connection" messages.
- 'Reached end of stream for /([0-9]{1,3})\.([0-9]{1,3})\.([0-9]{1,3})\.([0-9]{1,3})$' # Filters "Reached End of Stream" messages.
- '([A-Za-z0-9_]{3,16}) issued server command: /(.{0,})' # Filters "Player issued server command" messages (useful for hiding sensitive data like passwords).
- 'Read timed out' # Filters "Read timed out" messages.
- '^.*logged in with entity id ([0-9]{0,}) at.*$' # Filters login messages.
- '([A-Za-z0-9_]{3,16}) lost connection: Disconnected' # Filters player disconnect messages.
- '^(§e)([A-Za-z0-9_]{3,16}) left the game.' # Filters messages like "§ePLAYER left the game."
- 'Connection reset' # Filters "Connection reset" messages.
- 'CONSOLE: Forcing save\.\..*' # Filters console force-saving messages.
- 'CONSOLE: Save complete\..*' # Filters console save-completion messages.
RedstoneLimiter:
enabled: true
worlds: # Use '*' to enable for all worlds.
- '*'
values:
alerts: true
ticks_limit: # Maximum ticks per chunk per second.
redstone: 1100
piston: 50 # Total pushed blocks.
break_block: # Should LagFixer break blocks upon detection?
redstone: false
piston: false
piston:
push_blacklist: # Materials: https://hub.spigotmc.org/javadocs/spigot/org/bukkit/Material.html
- SAND
- RED_SAND
- GRAVEL
click_cooldown: 1500 # Cooldown (in ms) for levers, buttons, redstone torches, etc.
EntityLimiter:
enabled: true
worlds: # Use '*' to enable for all worlds.
- '*'
values:
alerts: false
perchunk:
enabled: true
creatures: 15 # Animals and monsters per chunk (-1 to disable).
items: 25 # Dropped items per chunk (-1 to disable).
vehicles: 3 # Minecarts and boats per chunk (-1 to disable).
projectiles: 5 # Projectiles per chunk (-1 to disable).
tiles: 10 # Disabled by the developer.
reasons: # Spawn reasons: https://hub.spigotmc.org/javadocs/spigot/org/bukkit/event/entity/CreatureSpawnEvent.SpawnReason.html
- DEFAULT
- EGG
- NATURAL
- SPAWNER
- SPAWNER_EGG
- COMMAND
perworld: # Managed by Spigot.
enabled: true
monsters: 70
animals: 10
water_animals: 5
water_ambient: 20
water_underground_creature: 5 # Only for 1.17+ servers.
axolotls: 5 # Only for 1.18+ servers.
ambient: 15
WorldCleaner:
enabled: true
worlds: # Use '*' to enable for all worlds.
- world
- world_the_end
- world_nether
values:
interval: 240 # Interval (in seconds) between WorldCleaner runs.
alerts: true # Configurable in lang.yml.
# Command: /lagfixer clear items
items:
enabled: true
disable_item_despawn: false # If true, LagFixer will handle item despawning instead of Bukkit.
time_lived: 10000 # Minimum time (in ms) an item must exist before removal (-1 to disable).
blacklist: # Materials: https://hub.spigotmc.org/javadocs/bukkit/org/bukkit/Material.html
- BEACON
abyss: # The abyss stores deleted items, which players can retrieve via /abyss.
enabled: false
alerts: true # Configurable in lang.yml.
permission: "lagfixer.abyss" # Leave empty to disable permission.
size: 54
item_despawn: true # If true, adds items to abyss when they despawn.
close: 30 # Clears abyss inventory and disables the command after this time.
blacklist: # Materials: https://hub.spigotmc.org/javadocs/bukkit/org/bukkit/Material.html
- BEDROCK
- BEACON
# Command: /lagfixer clear creatures
creatures:
enabled: true
named: false # Should named creatures be removed?
drop_items: false # If false, mobs die without dropping items.
babies: false # If true, removes baby mobs (including non-whitelisted ones).
list: # Allowed creatures: https://hub.spigotmc.org/javadocs/bukkit/org/bukkit/entity/EntityType.html
- BAT
- ZOMBIE
- SKELETON
- SLIME
- CREEPER
- SPIDER
- PHANTOM
- SQUID
# Command: /lagfixer clear projectiles (e.g., arrows, snowballs) - Coming soon.
projectiles:
enabled: true
blacklist: # Projectiles: https://hub.spigotmc.org/javadocs/bukkit/org/bukkit/entity/EntityType.html
- ENDER_PEARL
- EXPERIENCE_BOTTLE
- FIREBALL
- POTION
- WITHER_SKULL
# - EGG
# - SNOWBALL
# - ARROW
# Inspired by: https://modrinth.com/plugin/fast-leaf-decay (optimized with additional features).
InstantLeafDecay:
enabled: true
worlds: # Use '*' to enable for all worlds.
- world
- world_nether
values:
drop_items: true # Items drop when leaves decay.
tree_distance: 7 # Maximum distance from a tree trunk for leaves to decay.
leaves_decay: true # If false, leaves only decay when broken by players.
Modules:
⭐ MobAiReducer: (Impact on performance: VERY HIGH)
- Replaces creature movement to optimize and reduce behavior.
- Addresses inefficiencies caused by default animal behavior like unnecessary random movements or constant looking around.
- LagFixer intervenes by disabling unnecessary PathFinders or replacing them with more efficient ones.
- Crucial in scenarios with numerous animals as even minor movements can strain server resources.
⭐ ItemsCleaner (Impact on performance: MEDIUM)
- Cleans up old items on the ground to accelerate server performance.
- Accumulation of items over time contributes to server lag, especially in densely populated or active servers.
- Removes extraneous items promptly to relieve server burden.
- Players can retrieve items from the Abyss inventory using the /abyss command.
⭐ EntityLimiter (Impact on performance: HIGH)
- Restricts the number of entities per chunk.
- Essential for survival servers with expansive animal farms.
- Prevents excessive entity accumulation and associated performance issues.
- Maintains stable performance levels even in environments with high entity density.
⭐ LagMonitor (Impact on performance: HIGH)
- Monitors server load and adjusts settings during latency spikes.
- Addresses fluctuations in server performance to mitigate delays and lag.
- Dynamically adjusts settings, disables unnecessary features, and optimizes resources.
- Ensures smooth gameplay by minimizing the impact of performance fluctuations.
⭐ AntiRedstone (Impact on performance: LOW)
- Disables demanding Redstone clocks to prevent server overload.
- Certain Redstone configurations can lead to performance degradation and crashes.
- Activating AntiRedstone preserves server stability and ensures responsiveness.
- Facilitates uninterrupted gameplay even with complex Redstone contraptions.
⭐ ConsoleFilter (Impact on performance: VISUAL ONLY)
- Filters console messages based on predefined rules.
- Enhances clarity by selectively displaying essential messages.
- Reduces clutter and improves readability in multiplayer servers.
- Facilitates efficient server administration and enhances the user experience for both administrators and players.
⭐ VehicleMotionReducer (Impact on performance: MEDIUM)
- Optimizes all vehicles such as Boats and Minecarts.
- Removes minecarts with chests spawned in mineshafts.
- Particularly useful when minecarts are frequently used on the server.
- Enhances server performance by optimizing vehicle mechanics and removing unnecessary entities.
⭐ AbilityLimiter (Impact on performance: MEDIUM)
- Limits rapid Trident and Elytra usage to prevent excessive chunk loading.
- Frequent high-speed travel can cause server lag and instability.
- AbilityLimiter allows adjusting the speed reduction to balance performance and player experience.
- Activating AbilityLimiter ensures smoother world loading, stable server performance, and controlled mobility.