JAVA 11+
Introduction
 Welcome to ChunkOptimizer, the ultimate plugin for improving the performance of your Minecraft server by optimizing chunk loading and caching. Whether you're running a small server for friends or managing a bustling public server, ChunkOptimizer ensures efficient chunk management to minimize lag and maximize performance.
 
 
 ![[IMG]](/proxy/image?url=https%3A%2F%2Fmedia.discordapp.net%2Fattachments%2F916435645285691432%2F1310313810372067348%2FChunkOptimizer.png%3Fex%3D6744c454%26is%3D674372d4%26hm%3D3dc53f906a973dbee838cf22375a3241a00e5da6618db3ac99053da572cb6567%26%3D%26format%3Dwebp%26quality%3Dlossless%26width%3D350%26height%3D350)
 
 
 
Features
 Advanced Chunk Caching:
 Reduces the load on your server by caching frequently accessed chunks.
 Automatically manages cache size to prevent memory overuse.
 
 
Configurable Cleanup System:
 Cleans up unused chunks based on idle time, server load, and configurable batch sizes.
 Prevents performance drops even during peak player activity.
 
 
Dynamic Optimization:
 Automatically adjusts cleanup strategies based on server performance metrics (e.g., tick time).
 
 
Multi-World Support:
 Select which worlds to optimize (e.g., overworld, nether, end).
 
 
SQLite Integration:
 Saves and loads chunk data efficiently using an embedded SQLite database.
 
 
Why Use ChunkOptimizer?
 Chunk loading and unloading are some of the most resource-intensive tasks in a Minecraft server. ChunkOptimizer:
 - Reduces server strain during high player counts.
 - Prevents frequent reloading of the same chunks.
 - Improves TPS (ticks per second) by removing unnecessary background tasks.
 - Provides fine-grained control over chunk caching and cleanup.
 
 
Configuration
 ChunkOptimizer is fully customizable through its config.yml file. Here’s an example configuration:
 
 
 
  Code (YAML):
 
 
 
  # Cache Configuration
  
 
  
 cache
  :
   
  # Maximum number of chunks stored in the cache.
  
   
  # Recommended settings based on server size:
  
   
  # - Small servers (1-10 players): 500 chunks (~256MB additional RAM).
  
   
  # - Medium servers (10-50 players): 2000 chunks (~1GB additional RAM).
  
   
  # - Large servers (50+ players): 5000 chunks (~2.5GB additional RAM).
  
   max-size
  : 2000
  
 
  
   
  # Batch size for cleanup tasks.
  
   
  # Reduce this value if the plugin causes lag under high player counts.
  
   clean-batch-size
  : 100
  
 
  
   
  # Maximum idle time (in milliseconds) before removing a chunk from the cache.
  
   
  # For example: 60000 ms = 1 minute.
  
   max-idle-time
  : 60000
  
 
  
 
  # Worlds Optimization
  
 optimize-worlds
  :
   
  # Specify which worlds to optimize.
  
   world
  : true
  
   nether
  : false
  
   the_end
  : false
  
  
 
 
 
Installation
 
 
 - Place the ChunkOptimizer.jar file in your server's plugins folder.
  
 - Start your server to generate the default configuration file.
  
 - Customize the config.yml to suit your server’s needs.
  
 - Restart the server to apply changes.