KeepChunks
KeepChunks copied to clipboard
Ask for approval when loading big areas.
Is your feature request related to a problem? Please describe. Due to a mistake while using the keepregion command I tried loading a few thousend chunks, this caused the server to crash.
Describe the solution you'd like The plugin should ask for a second approval if more than a specific amount of chunks is loaded with a single command. The threashhold should be adjustable in the config.yaml. I envision a red prompt in the mineraft chat like: "Your trying to load X chunks. This might cause perforance issues or a server crash! If you want to proceed type Y in the chat."
Additional context
@Geitenijs Following up on this: The success of synchronous large scale chunk loading is HEAVILY dependent on whether or not the desired chunks have been generated yet. With everything loaded in memory, a 5000 chunk operation succeeds in a few seconds. (However, this will still mean the server stalls for that time) This goes hand in hand with what we discussed awhile back on reproduction issues, etc.
I tested various sizes ranging from 2,000-6,000 chunks: 25x25, 50x50 area (2600 chunks) on a fresh world, and it would exceed timeout-time of 60 seconds, as configured in the spigot.yml
Frankly, the only flexible and fix-all solution would be Paper's async loading, a method that is unavailable to us on Spigot. (Not that we really need it)
Since this is such a niche issue, and it's reasonable to assume players won't mass load ungenerated regions in one fell swoop. I'll implement a config variable that keepregion() will check the total requested chunk count against, before going through with loading.