TO USE THIS PLUGIN YOU NEED TO DOWNLOAD PROTOCOLIB. YOU CAN DOWNLOAD IT HERE.
LightOptimizer Plugin Introduction
Looking to maximize the performance of your Minecraft server? The LightOptimizer plugin is here to solve lag issues and provide your players with a seamless gaming experience!
Why Choose LightOptimizer? Comprehensive and Integrated Solutions: LightOptimizer offers performance improvements, memory optimization, FPS boosts, asynchronous processes, and more, all in one plugin. While other plugins typically focus on one issue, LightOptimizer provides a comprehensive solution for all aspects of server performance.
Customizable and Flexible Settings: With detailed configuration options, you can fine-tune performance settings to meet your server’s specific needs.
Advanced Technologies and Innovative Tools: Utilizing asynchronous processing and dynamic optimization techniques, it ensures continuous performance improvements without disrupting player experience.
Easy Setup and Use: It integrates seamlessly with your existing server configurations and offers a user-friendly interface for quick and easy configuration. Compared to other plugins, it offers a faster and smoother setup process.
Key Features: Entity Event Listener:
Entity Target: Cancels targeting actions of monsters.
Entity Damage: Prevents monsters from harming each other.
Tile Entity Data: Blocks tile entity data packets that lower FPS.
Chunk Data: Processes chunk data asynchronously.
Particle Data: Blocks high-intensity particles.
Smart Item Cleaner :
SmartClearItem: Periodically cleans up unnecessary items asynchronously without impacting performance. Sends informative messages to players after cleanup.
Smart Mob Cleaner :
SmartClearMob: Cleans up unnecessary mobs (named, pets, colored sheep) with customizable mob clearing criteria.
TPS Optimization :
TPSOptimizer: Monitors server TPS and automatically optimizes memory, CPU, and chunks when TPS drops below a certain threshold.
Redstone Optimization ⚙️:
AntiRedstone: Detects heavy redstone circuits and disables them automatically to prevent server overload.
RedstoneOptimizer: Throttles redstone updates to prevent high server loads from continuous redstone signals. It dynamically adjusts based on redstone usage, ensuring redstone circuits run efficiently without causing performance degradation.
Asynchronous Explosion Management :
AsyncExplosionManager: Asynchronously handles explosions from TNT, Creepers, and Ender Crystals, triggering them safely on the main thread.
Chunk Optimization ️:
ChunkOptimizer: Optimizes loaded chunks to reduce unnecessary load and asynchronously manages chunk loading and preloading.
Mob Chunk Loader :
MobChunkLoader: Ensures chunks containing mobs are loaded, and automatically loads chunks without mobs.
Server Startup Optimization :
ServerStartChunkOptimizer: Optimizes chunks on server startup, asynchronously loading chunks to improve performance.
UltraFast Chunk Loader ⚡:
UltraFastChunkLoader: Quickly loads chunks around players and uses caching to enhance performance.
Unused Chunk Cleaner :
UnusedChunkCleaner: Periodically cleans up unused chunks, optimizing memory management.
Server Helper ️:
ServerHelper: Automatically performs performance optimizations as part of LightOptimizer, monitoring TPS and starting memory, CPU, and chunk optimizations when values fall below certain thresholds. Sends informative messages to players and the console during performance improvements.
CustomMobAI:
DisableMobAI: Disables mob AI.
ProximityBasedAI: Enables AI only when mobs are near players.
SimplifiedPathfinding: Enhances performance with simplified pathfinding algorithms.
IdleAIManagement: Manages AI for stationary mobs.
ChunkBasedMobAIControl: Disables AI for mobs in chunks without players.
MobGroupingAI: Mobs group up and target together.
AIThrottling: Throttles AI execution to optimize performance.
SelectiveMobAI: Disables AI for specific mobs.
EventTriggeredAI: Activates mob AI based on certain events.
AISleepMode: Puts mobs into sleep mode for specified periods.
AIPrioritization: Gives priority to AI for mobs in specific situations.
DynamicAIDifficulty: Dynamically adjusts AI difficulty.
DisableMobMovement: Disables mob movement, gravity, and collision.
Item Cooldown Manager:
Cooldown Config: Manage cooldown times and settings via the configuration file.
Trident & Riptide: Separate cooldown management for tridents with the Riptide enchantment.
Firework Rocket: Applies cooldowns for firework rockets.
BadPacketControl:
Packet Check: Monitors packet counts from players and warns those who exceed set limits.
Warning Message: Sends customizable warning messages to players who send too many packets.
Packet Block: Blocks players who exceed packet limits for a certain time.
Configurable Limits: Configure maximum packet counts, check intervals, and block durations.
MemoryOptimizer :
Memory Optimization: Regularly optimizes your server’s memory.
Garbage Collection: Automatically triggers JVM Garbage Collection (GC) according to configuration settings.
Customizable Intervals: Adjust memory optimization and GC intervals via the config file.
Console Messages: Displays customizable console messages upon completion.
MobOptimizer :
Mob Management: Limits the number of mobs per chunk to enhance performance.
Customizable Limits: Set limits for mobs, monsters, and animals per chunk.
Advanced Filtering: Periodically optimizes mobs across the world and clears those reaching certain limits.
Console Messages: Displays customizable console messages upon completion.
MSPTOptimizer ⚙️:
MSPT Optimization: Monitors and manages your server’s Milliseconds Per Tick (MSPT).
Entity Count Control: Tracks the number of entities per chunk and sets limits based on their types.
Asynchronous Processes: Asynchronously performs chunk loading and mob clearing.
Auto Optimization: Automatically starts optimization processes when MSPT exceeds the threshold.
ExplosionEffectManager:
Cancel Explosion Sounds and Particles: Removes explosion sounds and particles to create a quieter and more performance-focused environment.
Prevent Fire and Block Damage: Prevents fire and block damage after explosions.
Explosion Radius Control: Allows you to configure the power and area of effect of explosions.
ExplosionLimiter:
Explosion Limit per Chunk: Limits the maximum TNT and End Crystal explosions per chunk, preventing overload.
Automatic Limit Reset: Explosion limits are reset every minute to ensure balanced gameplay.
LightUpdateOptimizer:
Dynamic Light Optimization: Optimizes light updates to improve server performance.
Asynchronous Processing: Processes light updates in the background, reducing load on the main thread.
DisableFallingBlocks:
Prevents blocks like sand, gravel, and concrete powder from falling, reducing potential performance issues caused by falling blocks. This helps keep your server running smoothly.
EntityCulling:
Improves server performance by disabling entities beyond a certain distance from the player. This feature minimizes the load from entities outside the player's line of sight, except for specified entity types.
HopperOptimizer:
Hopper Transfer Optimization: Reduces transfer cooldowns for hoppers, enhancing resource movement efficiency.
Dynamic Hopper Tracking: Automatically tracks active hoppers, ensuring they are optimized only when necessary.
FastChunkLoader: This tool boosts your server’s performance by accelerating chunk loading and preloading nearby chunks for players, ensuring a seamless gameplay experience. Using asynchronous and multi-threaded processing, it efficiently manages loading tasks so necessary areas are prepared quickly, maintaining optimal server performance.
Feedback and Support Don’t hesitate to share your experiences using LightOptimizer! Your feedback is valuable to us and inspires us to continue improving the plugin. For any questions, suggestions, or support requests, feel free to reach out to us on our
Discord server. Thank you for your feedback!
If you liked the plugin, feel free to leave a review and support us!
Known Issues:
Using Riptide Trident may mistakenly apply cooldowns to normal tridents.
Using normal tridents may mistakenly apply cooldowns to Riptide Tridents.
Beta Features:
CustomMobAİ: This is a beta feature.
ChunkMobsCommand: This is a beta feature.
StatusCommand: This is a beta feature.
# Configuration for LightOptimizer
serverHelper:
enabled: true # Enables or disables the Server Helper
tpsOptimization:
# TPS threshold. Optimization is performed if the TPS drops below this threshold.
# For example, if set to 15.0, optimization will occur when TPS drops below 15.
threshold: 15.0
# Tile Entity limit. Optimization will be triggered if the number of tile entities
# in a world exceeds this limit. This limit is used to maintain server performance.
# For example, if set to 50, optimization will occur if there are more than 50 tile entities.
tileEntityLimit: 50
maxItemsPerChunk: 50 # Maximum number of items per chunk before optimization
messages:
lowTps: "&c&lServer performance is dropping!" # Message displayed when TPS is low
optimizing: "&e&lServer performance is being optimized." # Message displayed during optimization
optimized: "&a&lServer performance has been optimized." # Message displayed after optimization
clearAllMobsWarning: "This will clear all mobs in the world. Type /lightoptimizer smartclearmoball again to confirm." # Warning message shown when executing the command to clear all mobs in the world
smartClearItem:
enabled: true # Enables or disables the smart item clearing
clearItems: true # Enables or disables item clearing
message: true # Enables or disables messages
interval: 300 # Interval in seconds for the item clearing task
smartClearMob:
enabled: true # Whether the smart mob clearing feature is enabled
clearNamedMobs: false # Whether to clear mobs that have been named by players
clearTamedMobs: false # Whether to clear tamed mobs (pets) from the world
clearColoredSheep: false # If true, colored sheep will be cleared
interval: 300 # Interval in seconds between automatic mob clearing tasks
message: true # Whether to send a message to players when mobs are cleared
disableMobs:
- "VILLAGER" # List of mobs that will not be cleared
- "IRON_GOLEM"
disableWorlds:
- "disableworld1" # List of worlds where mob clearing will not be executed
- "disableworld2"
badPacketControl:
maxPacketsPerSecond: 50 # Maximum number of packets per second allowed
checkInterval: 1 # Interval in seconds for checking packet rates
blockDuration: 5 # Duration in seconds to block packets if the limit is exceeded
warningMessage: "&cYou are sending too many packets, please slow down!" # Warning message for exceeding packet rate
memoryOptimization:
# Enables or disables memory optimization features
enabled: true
# Determines how often memory optimization tasks run (in seconds)
interval: 600
# Specifies the interval for GC to run (in seconds)
gcInterval: 3600 # Ensures GC runs every 3600 seconds
# Logs a message to the console when GC is triggered
consoleMessage: true
# Timestamp of the last GC call
lastGcTime: 0 # Initial timestamp; updated with each GC call
mobOptimization:
enabled: true # Enables or disables the mob optimization task
interval: 600 # Interval in seconds for the mob optimization task
maxMobsPerChunk: 15 # Maximum number of mobs per chunk before optimization
maxMonstersPerChunk: 10 # Maximum number of monsters per chunk before optimization
maxAnimalsPerChunk: 5 # Maximum number of animals per chunk before optimization
messages:
mobOptimization: "&eMob optimization task executed." # Message displayed after mob optimization task
msptOptimization:
enabled: true # Enable or disable MSPT optimization
maxEntitiesPerType: 50 # Maximum number of entities of the same type allowed per chunk
redstoneOptimization:
enabled: true
checkInterval: 100 # Interval in seconds between redstone optimizations
deactivationThreshold: 10 # Time in seconds after which inactive redstone circuits will be deactivated
throttleInterval: 2 # Interval in seconds for throttling redstone updates
disableHighLoadCircuits: true # Whether to disable redstone circuits with high load
maxRedstoneUpdates: 100 # Maximum number of redstone updates before throttling
unusedChunkCleanup:
enabled: true # Enables or disables the unused chunk cleanup task
interval: 10m # The interval in minutes at which the cleanup task will run (e.g., 10m = 10 minutes)
unusedTimeThreshold: 30m # The time in minutes a chunk must be unused to be considered for cleanup (e.g., 30m = 30 minutes)
threadPoolSize: 4 # The number of threads to use for cleaning up chunks (default is the number of available processors)
mobChunkLoading:
enabled: true # Enable or disable mob chunk loading control
# mobAI: Disables the AI (Artificial Intelligence) of mobs.
# When set to true, all mob AI will be disabled.
disable-mobai: false
explosions:
asyncTNT: true # Should TNT explosions be asynchronous?
asyncCreeper: true # Should Creeper explosions be asynchronous?
asyncCrystal: true # Should Ender Crystal explosions be asynchronous?
#playerJoinOptimization:
# enabled: true # Enable or disable player join optimization
# threadPoolSize: 4 # The size of the thread pool for player join optimization tasks
# preloadRadius: 3 # The radius around the player to preload chunks
# maxConcurrentLoads: 5 # The maximum number of chunks to load concurrently
###########################################################
# #
# WARNING: DO NOT ENABLE THIS FEATURE IF YOUR SERVER #
# MACHINE IS NOT POWERFUL ENOUGH. IT MAY CAUSE #
# PERFORMANCE ISSUES. #
# #
###########################################################
serverStartChunkOptimization:
enabled: false # Enable or disable server start chunk optimization
threadPoolSize: 1 # The size of the thread pool for server start chunk optimization tasks Size of the thread pool (can be adjusted based on CPU core count).
batchSize: 75 # The number of chunks to process in each batch
chunkPreloading:
enabled: false # Enable or disable chunk preloading
interval: 3 # The interval (in seconds) for chunk preloading tasks
radius: 2 # The radius around the player for chunk preloading
###########################################################
# #
# WARNING: DO NOT ENABLE THIS FEATURE IF YOUR SERVER #
# MACHINE IS NOT POWERFUL ENOUGH. IT MAY CAUSE #
# PERFORMANCE ISSUES. #
# #
###########################################################
chunkOptimization:
enabled: false # Enable or disable chunk optimization
threadPoolSize: 4 # The size of the thread pool for chunk optimization tasks Size of the thread pool (can be adjusted based on CPU core count).
batchSize: 20 # The number of chunks to process in each batch
interval: 600 # The interval (in seconds) for chunk optimization tasks
# Should OPs bypass the cooldown? Set to true or false.
op-bypass: false
# Should the slot cooldown be enabled? This adds a visual cooldown on the item slot.
slot-cooldown: true
# Enables or disables the AntiRedstone feature.
enabled: true
opbypass: true
playerbypass: true
# bypass-permission: "lightoptimizer.antiredstone.bypass"
# Settings for functional blocks
functional:
# Controls the functionality of pistons
pistons:
enabled: true
# Controls the functionality of sticky pistons
stickyPistons:
enabled: true
# Controls the functionality of observers
observers:
enabled: true
# Controls the functionality of dispensers
dispensers:
enabled: true
# Controls the functionality of droppers
droppers:
enabled: true
# Controls the functionality of hoppers
hoppers:
enabled: true
badPacketControl:
warningMessage: "&cYou are sending too many packets, please slow down!"
smartClearItemMessage: "&a&lItems have been cleared."
smartClearMobMessage: "&a&lMobs have been cleared."
confirmClearAllMobsMessage: "&cWarning: This action will immediately clear all mobs. Use the command again to confirm."
allMobsClearedMessage: "&a&lAll mobs have been cleared."
memoryFreedMessage: "&a&lMemory has been freed."
unknownCommandMessage: "&cUnknown command. Use /lightoptimizer help to see the available commands."
serverhelper-messages:
lowTps: "&c&lServer performance is dropping!"
optimizing: "&e&lServer performance is being optimized."
optimized: "&a&lServer performance has been optimized."
# If true, blocks low-resolution map data packets to reduce bandwidth usage and potential FPS drops.
block-low-resolution-maps: true
# Maximum allowed map resolution. Any maps with a resolution higher than this value will be blocked.
map-max-resolution: 2
# If true, blocks packets that can cause significant FPS drops, such as tile entity data with high actions.
block-fps-dropping-packets: true
# Maximum allowed action value for tile entity data packets. Higher values will be blocked to prevent FPS issues.
tile-entity-max-action: 10
# If true, optimizes entity metadata packets by limiting unnecessary data, reducing the chance of FPS drops.
optimize-entity-metadata: true
# Maximum value allowed in entity metadata packets. Values higher than this will be reduced to this limit.
entity-metadata-max-value: 64
# If true, blocks particle packets that exceed a certain particle count to prevent FPS drops from excessive visual effects.
block-intensive-particles: true
# Maximum number of particles allowed in a single particle packet. Packets exceeding this will be blocked.
max-particle-count: 100
# Custom Mob AI Configuration
# proximity-based-ai-activation: Activates mob AI when a player is nearby.
proximity-based-ai-activation: false
# idle-ai-management: Manages mob AI when idle.
idle-ai-management: false
# chunk-based-mob-ai-control: Controls mob AI based on chunk loading/unloading.
chunk-based-mob-ai-control: false
# mob-grouping-ai: Groups mobs together and manages their AI collectively.
mob-grouping-ai: false
# ai-throttling: Reduces the frequency of AI updates to improve performance.
ai-throttling: false
# selective-mob-ai: Enables AI for specific mobs only.
selective-mob-ai: false
# event-triggered-ai: Activates mob AI based on specific events.
event-triggered-ai: false
# Mob AI enters sleep mode when players are far away.
ai-sleep-mode: false
# AI is prioritized for specially named mobs (e.g., Boss).
mob-ai-prioritization: false
# AI behavior adjusts dynamically based on server difficulty.
dynamic-ai-difficulty: true
# This setting controls mob movements. If 'true', the movements of mobs are disabled when players are nearby.
disable-mob-movement: false
# LightUpdateOptimizer settings
lightUpdates:
enabled: true # Enable/disable light updates entirely. If set to false, no light updates will be processed.
async: true # Enable/disable asynchronous light updates. If true, light updates will be handled asynchronously, reducing lag on the main server thread.
interval: 5 # Interval in seconds to process light updates. A lower value will update light more frequently but can impact performance.
# ExplosionLimiter settings
explosionLimits:
enabled: true # Enable/disable the explosion limit feature. If enabled, TNT and Ender Crystals are limited per chunk.
enable-tnt: true # Enable/disable TNT explosion limiting per chunk.
enable-endcrystal: true # Enable/disable Ender Crystal explosion limiting per chunk.
tntPerChunk: 50 # The maximum number of TNT explosions allowed per chunk. Once the limit is reached, extra TNT will not explode.
endCrystalPerChunk: 10 # The maximum number of Ender Crystal explosions allowed per chunk. Once the limit is reached, extra Ender Crystals will be removed.
explosions:
disable-explosion-sound: true # Disable explosion sounds
disable-explosion-particles: true # Disable explosion particles
disable-fire: true # Disable fire generation during explosions
explosion-radius: 4 # Set the explosion radius (default: 4)
prevent-block-damage: true # Prevent block damage during explosions