Skip to content

fix(backup): reload backup service on plugin initialization#428

Merged
thomasmny merged 3 commits intothomasmny:masterfrom
TWME-TW:fix-backup
Mar 15, 2026
Merged

fix(backup): reload backup service on plugin initialization#428
thomasmny merged 3 commits intothomasmny:masterfrom
TWME-TW:fix-backup

Conversation

@TWME-TW
Copy link
Contributor

@TWME-TW TWME-TW commented Mar 15, 2026

No description provided.

Copilot AI review requested due to automatic review settings March 15, 2026 04:07
Copy link

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Updates the backup subsystem so the auto-backup scheduler can be restarted/cancelled when configuration is reloaded, ensuring changes to AutoBackup.enabled take effect without a full plugin restart.

Changes:

  • Track the auto-backup BukkitTask in BackupService and add a reload() method to restart/cancel it based on current config.
  • Ensure Config.load() refreshes its cached FileConfiguration reference after reloadConfig().
  • Invoke backupService.reload() after config reload.

Reviewed changes

Copilot reviewed 3 out of 3 changed files in this pull request and generated 2 comments.

File Description
buildsystem-core/src/main/java/de/eintosti/buildsystem/world/backup/BackupService.java Stores the scheduled task and adds reload() to restart/cancel auto-backups based on config.
buildsystem-core/src/main/java/de/eintosti/buildsystem/config/Config.java Makes CONFIG reassignable and refreshes it in load() so reloads use the latest config instance.
buildsystem-core/src/main/java/de/eintosti/buildsystem/BuildSystemPlugin.java Calls backupService.reload() as part of reloadConfigData.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

You can also share your feedback on Copilot code review. Take the survey.

@thomasmny
Copy link
Owner

Hi @TWME-TW, thanks for the PR! Could you please address Copilot's reviews?

TWME-TW and others added 2 commits March 15, 2026 16:59
Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
@thomasmny thomasmny merged commit ab85495 into thomasmny:master Mar 15, 2026
1 check passed
@TWME-TW TWME-TW deleted the fix-backup branch March 16, 2026 03:43
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants