10 Chunk processor
NotMyFault edited this page 2021-04-27 17:47:13 +02:00

Warning:

This is a new feature, not a magical solution to all your problems. The chunk processor isn't perfect, and it is your fault if it fails to prevent lag / crashes (Although feel free to create a ticket if you think it's something it could prevent in future).

It is however very efficient, and will hardly leave a footprint when there are no chunks to process.

Overview

The chunk processor will process chunks before they are saved / loaded from disk. It is lightweight at the moment with the following capabilities:

  • Clear entities if a dangerous amount is detected
  • Clear blockstates if a dangerous amount is detected

The purpose of the processor is to:

  • Decrease server lag
  • Prevent potentially dangerous chunks being saved / loaded from disk
  • Prevent repeated server crashes from dangerous chunks

The usual causes of dangerous chunks are:

  • People abusing WorldEdit
  • People abusing VoxelSniper
  • Any other server-tool you have that can be used to spam entites / blocks

Configuration

Configuration is done through the settings.yml

To enable the chunk processor, set the following:

enabled-components:
  # Processes chunks (trimming, or entity/tile limits) 
  chunk-processor: true

It can then be configured further, changing these values:

chunk-processor:
  # Auto trim will not save chunks which aren't claimed
  auto-trim: false
  # Max tile entities per chunk
  max-tiles: 3
  # Max entities per chunk
  max-entities: 512
  # Disable block physics
  disable-physics: false

If the tile entity / entity limit has been reached, the chunk processor will remove the entities that exceed the limit when the chunk is saved. It will also prevent players that don't have /plot weanywhere enabled from exceeding the limit using WorldEdit.

When the chunk processor is activated, players will not be able to use tile entities as a part of the plot components when using /plot set.

Tip: If using Paper, you may also enable "tile-entity-check" under the paper components. This will prevent players from placing new tile entities when the tile entity limit has been reached in that particular chunk.

Info: For more information about tile entities see: https://hub.spigotmc.org/javadocs/spigot/org/bukkit/block/package-tree.html (Or do a google search.)