mirror of
https://github.com/IntellectualSites/PlotSquared.git
synced 2025-07-02 13:44:43 +02:00
Added experimental chunk processing:
If enabled: - Detects laggy chunks based on a configured threshold - Removes all sources of lag from the chunk If the threshold is set too low, normal levels of blocks and entities will be considered "sources of lag", so just be careful when using this experimental feature.
This commit is contained in:
@ -30,6 +30,7 @@ import com.intellectualcrafters.plot.flag.FlagManager;
|
||||
import com.intellectualcrafters.plot.generator.BukkitHybridUtils;
|
||||
import com.intellectualcrafters.plot.generator.HybridGen;
|
||||
import com.intellectualcrafters.plot.generator.HybridUtils;
|
||||
import com.intellectualcrafters.plot.listeners.ChunkListener;
|
||||
import com.intellectualcrafters.plot.listeners.ForceFieldListener;
|
||||
import com.intellectualcrafters.plot.listeners.InventoryListener;
|
||||
import com.intellectualcrafters.plot.listeners.PlayerEvents;
|
||||
@ -103,6 +104,12 @@ public class BukkitMain extends JavaPlugin implements Listener, IPlotMain {
|
||||
log("&dUsing metrics will allow us to improve the plugin, please consider it :)");
|
||||
}
|
||||
getServer().getPluginManager().registerEvents(new WorldEvents(), this);
|
||||
|
||||
// Experimental
|
||||
if (Settings.CHUNK_PROCESSOR) {
|
||||
getServer().getPluginManager().registerEvents(new ChunkListener(), this);
|
||||
}
|
||||
|
||||
List<World> worlds = Bukkit.getWorlds();
|
||||
if (worlds.size() > 0) {
|
||||
UUIDHandler.cacheAll(worlds.get(0).getName());
|
||||
|
Reference in New Issue
Block a user