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

Refactor DynamicBackup, accompanying bug fixes #22

Open
wants to merge 2 commits into
base: master
Choose a base branch
from

Conversation

NickBonet
Copy link

@NickBonet NickBonet commented Sep 21, 2023

  • When using dynamic backup, Nether & End region files weren't properly backed up by ZipManager, this was also patched.
  • Simplified backupInfo.yml, doesn't seem like the World objects needed to be serialized to YAML, instead just serialized a few details so that the YAML paths for regions were still written as expected. Fixes global tag issues when loading backupInfo.yml next server boot.
  • Removed the internal chunks array from DynamicBackup and refactored the class to utilize DRY principles.
    • At times, the way the chunks array was accessed was causing out of bounds exceptions.
    • In addition, after reviewing the logic, it didn't seem necessary to keep an internal array as its state could get messy over time, depending how events/tasks were handled.
  • Moved saveChanges() to ServerBackup, allowing it to be used everywhere saveBpInf() was being used prior.
  • Added try-with-resources block to Files.walk() usage in ZipManager

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

Successfully merging this pull request may close these issues.

1 participant