From 8715a27a934dec7b1780314a1fae75aa995b7e33 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Alexander=20S=C3=B6derberg?= Date: Sun, 10 May 2020 14:41:02 +0200 Subject: [PATCH] No backups for merged plots :cow: --- .../main/java/com/plotsquared/core/backup/BackupManager.java | 5 +++-- .../com/plotsquared/core/backup/SimpleBackupManager.java | 2 +- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/Core/src/main/java/com/plotsquared/core/backup/BackupManager.java b/Core/src/main/java/com/plotsquared/core/backup/BackupManager.java index 0d1842fc3..4077be914 100644 --- a/Core/src/main/java/com/plotsquared/core/backup/BackupManager.java +++ b/Core/src/main/java/com/plotsquared/core/backup/BackupManager.java @@ -43,8 +43,9 @@ public interface BackupManager { @NotNull BackupProfile getProfile(@NotNull final Plot plot); /** - * 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. + * This will perform an automatic backup of the plot iff the plot has an owner, + * automatic backups are enabled and the plot is not merged. + * Otherwise it will complete immediately. * * @param plot Plot to perform the automatic backup on * @return Future that completes when the backup is finished diff --git a/Core/src/main/java/com/plotsquared/core/backup/SimpleBackupManager.java b/Core/src/main/java/com/plotsquared/core/backup/SimpleBackupManager.java index 4f86af781..492b5ed60 100644 --- a/Core/src/main/java/com/plotsquared/core/backup/SimpleBackupManager.java +++ b/Core/src/main/java/com/plotsquared/core/backup/SimpleBackupManager.java @@ -56,7 +56,7 @@ import java.util.concurrent.CompletableFuture; } @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 NullBackupProfile();