No backups for merged plots 🐮

This commit is contained in:
Alexander Söderberg 2020-05-10 14:41:02 +02:00
parent 723e29cdd0
commit 8715a27a93
No known key found for this signature in database
GPG Key ID: C0207FF7EA146678
2 changed files with 4 additions and 3 deletions

View File

@ -43,8 +43,9 @@ public interface BackupManager {
@NotNull BackupProfile getProfile(@NotNull final Plot plot); @NotNull BackupProfile getProfile(@NotNull final Plot plot);
/** /**
* This will perform an automatic backup of the plot iff the plot has an owner * This will perform an automatic backup of the plot iff the plot has an owner,
* and automatic backups are enabled. Otherwise it will complete immediately. * automatic backups are enabled and the plot is not merged.
* Otherwise it will complete immediately.
* *
* @param plot Plot to perform the automatic backup on * @param plot Plot to perform the automatic backup on
* @return Future that completes when the backup is finished * @return Future that completes when the backup is finished

View File

@ -56,7 +56,7 @@ import java.util.concurrent.CompletableFuture;
} }
@Override @NotNull public BackupProfile getProfile(@NotNull final Plot plot) { @Override @NotNull public BackupProfile getProfile(@NotNull final Plot plot) {
if (plot.hasOwner()) { if (plot.hasOwner() && !plot.isMerged()) {
return new PlayerBackupProfile(plot.getOwnerAbs(), plot, this); return new PlayerBackupProfile(plot.getOwnerAbs(), plot, this);
} }
return new NullBackupProfile(); return new NullBackupProfile();