From 2f4a53711eff9051f28a7e37768b171eb0168c57 Mon Sep 17 00:00:00 2001 From: Rsl1122 Date: Wed, 31 Jul 2019 12:44:49 +0300 Subject: [PATCH] Reordered player remove call for QueryService This is to avoid issues where deletion needs username from the plan database. --- .../plan/command/commands/manage/ManageRemoveCommand.java | 2 +- .../src/main/java/com/djrapitops/plan/db/tasks/DBCleanTask.java | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/Plan/common/src/main/java/com/djrapitops/plan/command/commands/manage/ManageRemoveCommand.java b/Plan/common/src/main/java/com/djrapitops/plan/command/commands/manage/ManageRemoveCommand.java index c387f3081..fcc9efb76 100644 --- a/Plan/common/src/main/java/com/djrapitops/plan/command/commands/manage/ManageRemoveCommand.java +++ b/Plan/common/src/main/java/com/djrapitops/plan/command/commands/manage/ManageRemoveCommand.java @@ -124,9 +124,9 @@ public class ManageRemoveCommand extends CommandNode { } sender.sendMessage(locale.getString(ManageLang.PROGRESS_START)); + queryService.playerRemoved(playerUUID); db.executeTransaction(new RemovePlayerTransaction(playerUUID)) .get(); // Wait for completion - queryService.playerRemoved(playerUUID); sender.sendMessage(locale.getString(ManageLang.PROGRESS_SUCCESS)); } catch (InterruptedException e) { Thread.currentThread().interrupt(); diff --git a/Plan/common/src/main/java/com/djrapitops/plan/db/tasks/DBCleanTask.java b/Plan/common/src/main/java/com/djrapitops/plan/db/tasks/DBCleanTask.java index c9c2c54de..b9cb96298 100644 --- a/Plan/common/src/main/java/com/djrapitops/plan/db/tasks/DBCleanTask.java +++ b/Plan/common/src/main/java/com/djrapitops/plan/db/tasks/DBCleanTask.java @@ -115,8 +115,8 @@ public class DBCleanTask extends AbsRunnable { List inactivePlayers = database.query(fetchInactivePlayerUUIDs(keepActiveAfter)); for (UUID playerUUID : inactivePlayers) { - database.executeTransaction(new RemovePlayerTransaction(playerUUID)); queryService.playerRemoved(playerUUID); + database.executeTransaction(new RemovePlayerTransaction(playerUUID)); } return inactivePlayers.size(); }