Fix tab completion for the backup command

This commit is contained in:
Alexander Söderberg 2020-05-10 19:42:42 +02:00
parent f7d6ac00e4
commit c4a70c0945
No known key found for this signature in database
GPG Key ID: C0207FF7EA146678
2 changed files with 2 additions and 2 deletions

View File

@ -95,7 +95,7 @@ public class PlayerBackupProfile implements BackupProfile {
} catch (IOException e) {
e.printStackTrace();
}
return backups;
return (this.backupCache = backups);
});
}
}

View File

@ -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<List<com.plotsquared.core.backup.Backup>> backupList = backupProfile.listBackups();
if (backupList.isDone()) {
final List<com.plotsquared.core.backup.Backup> backups = backupList.getNow(new ArrayList<>());