From c4a70c0945c0870463fe4d38a76220c5f0dc48f1 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Alexander=20S=C3=B6derberg?= Date: Sun, 10 May 2020 19:42:42 +0200 Subject: [PATCH] Fix tab completion for the backup command --- .../java/com/plotsquared/core/backup/PlayerBackupProfile.java | 2 +- Core/src/main/java/com/plotsquared/core/command/Backup.java | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/Core/src/main/java/com/plotsquared/core/backup/PlayerBackupProfile.java b/Core/src/main/java/com/plotsquared/core/backup/PlayerBackupProfile.java index 0b551fcd6..232602694 100644 --- a/Core/src/main/java/com/plotsquared/core/backup/PlayerBackupProfile.java +++ b/Core/src/main/java/com/plotsquared/core/backup/PlayerBackupProfile.java @@ -95,7 +95,7 @@ public class PlayerBackupProfile implements BackupProfile { } catch (IOException e) { e.printStackTrace(); } - return backups; + return (this.backupCache = backups); }); } } diff --git a/Core/src/main/java/com/plotsquared/core/command/Backup.java b/Core/src/main/java/com/plotsquared/core/command/Backup.java index 948722e32..9040735af 100644 --- a/Core/src/main/java/com/plotsquared/core/command/Backup.java +++ b/Core/src/main/java/com/plotsquared/core/command/Backup.java @@ -90,7 +90,7 @@ public final class Backup extends Command { final Plot plot = player.getCurrentPlot(); if (plot != null) { final BackupProfile backupProfile = Objects.requireNonNull(PlotSquared.imp()).getBackupManager().getProfile(plot); - if (!(backupProfile instanceof PlayerBackupProfile)) { + if (backupProfile instanceof PlayerBackupProfile) { final CompletableFuture> backupList = backupProfile.listBackups(); if (backupList.isDone()) { final List backups = backupList.getNow(new ArrayList<>());