Regionerator

Bukkit Plugins
1,481 Downloads Last Updated: Oct 17, 2019 Game Version: 1.14

Disclaimer

Regionerator deletes chunks from your world by directly modifying and deleting region files. This cannot be undone. Keep regular backups. The author is not responsible for any damages to your world or server incurred by using this plugin. Use at your own risk!

Functions

Regionerator deletes unused chunks and regions, allowing you to free up disk space and get rid of old builds or devastated land.
Players in Spectator gamemode do not cause land to be marked visited, as they are not actually physically there. This can be useful for admins trying to unflag area or check chunks without refreshing visitation flags.

Commands require the regionerator.command permission.

/regionerator -  Report current status of all worlds.
/regionerator reload - Reload the configuration and restart all deletion tasks.
/regionerator pause - Pause deletion tasks. To prevent issues, the plugin will finish the region it is currently checking before pausing.
/regionerator resume - Resume deletion tasks.
/regionerator check - Check the status of a chunk.
/regionerator flag - Permanently flag the relevant area as visited.
/regionerator unflag - Unflag the relevant area.

Flagging Parameters

  • No parameters (e.g. /regionerator flag)
    • Player-only
    • Edit flag on current chunk
  • Chunk x and chunk z (e.g. /regionerator unflag 0 0)
    • Player-only
    • Edit flag on specified chunk
  • World name, chunk x, chunk z (e.g. /regionerator flag world 0 0)
    • Player/console supported
    • Edit flag on specified chunk in world
  • Selection (e.g. /regionerator unflag selection)
    • Player-only
    • Edit flags on all chunks within selection
    • Requires WorldEdit

Developers

Each time Regionerator attempts to delete a chunk, the RegioneratorChunkDeleteEvent is fired. The event can be called up to 1024 times per tick per cycle running, and Regionerator itself, while much more efficient than it used to be, is still quite heavy. Caution is advised for anyone using it.
Regionerator also makes no guarantee that chunks are fully deleted - it's possible that chunks could be stored unloaded and waiting to be written when Regionerator visits them.

Configuration

# Square around each player's current chunk to flag.
chunk-flag-radius: 4

# Every x seconds, chunks around each player online are flagged.
seconds-per-flag: 10

# Flags are saved every x minutes.
minutes-per-flag-autosave: 5

# Flags older than x days can be ignored and the region deleted.
# To disable flagging, set this to 0.
# days-till-flag-expires must be greater than 0 to be used with delete-new-unvisited-chunks
days-till-flag-expires: 7

# Chunks generated after the plugin is installed are automatically flagged.
# If false, these chunks will be permanently flagged until visited.
# Setting this value to false will allow you to pre-generate your maps for reduced load from exploration.
# It will also reduce the amount of time wasted deleting untouched areas.
delete-new-unvisited-chunks: false

# Time in between deleting regions in ticks (20 ticks = 1 second)
ticks-per-deletion: 5

# Chunks checked for deletion per interval. Default (128) handles an entire region every 9 intervals.
# If this value is 1024 or lower (1 or fewer regions per cycle) an entire run cycle is dedicated to deletion to prevent lag.
chunks-per-deletion: 128

# Hours between deletion cycles (cycles all reset on plugin reload/server restart)
hours-between-cycles: 12

# Allow deletion cycles for separate worlds to run simultaneously.
# Only enable this option if your server hardware is quite good.
allow-concurrent-cycles: false

# Worlds the plugin is able to delete regions in
# If you change this list, be sure to delete the field "delete-this-to-reset-plugin" so that areas in use are not deleted by accident.
worlds: []

# Hooks to attempt to check for protections from.
# If your protection plugin of choice isn't here, ask!
hooks:
  ASkyBlock: true
  Factions: true<br />  Feudal: true
  GriefPrevention: true
  Kingdoms: true
  Landlord: true<br />  Lands: true<br />  PreciousStones: true
  RedProtect: true
  Residence: true
  Towny: true
  WorldGuard: true
  VanillaSpawnProtection: true

# Debug-level enables more and more verbose logging of actions as increased.
# OFF - no debug messages
# LOW - Minimal debug messages, periodic deletion reports
# MEDIUM - More debug messages. Spammy, not recommended.
# HIGH - Lots of debug messages. Don't enable this unless you have a serious issue.
debug-level: LOW

FAQ

My server is lagging! What can I do?
Try reducing chunks-per-deletion. Deletion must be done on the main thread to prevent potential world corruption, so there isn't much else that can be done. After the initial run, during which there's a lot of area to delete, it runs a lot more smoothly.

Why is it taking so long to start deleting area?
Regionerator doesn't magically know what has and hasn't been visited. It needs to gather data for as long as it takes chunks to become unvisited before it can tell what's safe to delete.

Why does regeneration take so long?
If cycles are taking too long for your taste, try increasing chunks-per-deletion or decreasing ticks-per-deletion.

Do you support custom world generators?
Regionerator doesn't actually regenerate area, it deletes it. Whatever world generator you're using will then provide the chunk when it generates again.

Will you add support for this protection plugin?
Sure, point me to it. Provided it has a way I can efficiently check for claims in a chunk, I'll do it. I can't guarantee it'll happen soon, but Regionerator is open source, you're free to submit a pull request. I also can't effectively test plugins that I do not use myself, so I cannot guarantee that it will function properly.

Which protection systems are supported?

I only test hooks which I have an existing environment set up for. Please do not to put a plugin of this nature on a live server without a testing period anyway, but be even more cautious if you are using an untested hook.

Comments

  • To post a comment, please or register a new account.
Posts Quoted: