Reordered player remove call for QueryService

This is to avoid issues where deletion needs username from
the plan database.
This commit is contained in:
Rsl1122 2019-07-31 12:44:49 +03:00
parent b073b23832
commit 2f4a53711e
2 changed files with 2 additions and 2 deletions

View File

@ -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();

View File

@ -115,8 +115,8 @@ public class DBCleanTask extends AbsRunnable {
List<UUID> 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();
}