
Suggestion: alphabetize `plotManagementIgnoreIds` and `PlotManagementWildRegenBlocks`
MilesBHuff opened this issue ยท 2 comments
Please explain your feature request to the best of your abilities:
This is just a small quality-of-life thing for a minority of users (so not high-priority by any means), but:
plotManagementIgnoreIds
and PlotManagementWildRegenBlocks
in Towny/data/worlds/*.txt
are read and then written in random order every time Towny is loaded. This is annoying when version-controlling these files, since every server load will mark these files as modified. This is also just a needless write to the filesystem. Alphabetizing these (and related) lists will avoid needlessly dirtying repositories and make it clearer what is changed when real changes do come down the pipeline.
This could be potentially solved changing those to LinkedLists, but it wouldn't lessen any file system writes, those are going to happen no matter what.
I'd have to see if LinkedLists would break anything else though. That would still require that your lists get put into an alphabetized order. That order would then get broken when we add new items to the list via the ConfigMigrator.
Thanks, LlmDl. This is a minor QoL feature for a minority of users, so it's really not high-priority; just if and whenever you feel like it.
No biggie ofc on not avoiding the disk writes. I actually realized a few hours after opening this, when messing around with Towny's config.yml
on a running server, that the server indeed writes to the file on every load; so I guess that must just be a thing innate to the functioning of the plugin; or, at the very least, a separate issue from this. These excess writes are probably not really worth looking into or fixing, since they don't impair the functioning of the plugin.