Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Suggestion: alphabetize plotManagementIgnoreIds and PlotManagementWildRegenBlocks #7461

Open
MilesBHuff opened this issue Jun 10, 2024 · 2 comments

Comments

@MilesBHuff
Copy link

MilesBHuff commented Jun 10, 2024

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.

@LlmDl
Copy link
Member

LlmDl commented Jun 11, 2024

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.

@MilesBHuff
Copy link
Author

MilesBHuff commented Jun 11, 2024

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants