mirror of
https://github.com/plan-player-analytics/Plan.git
synced 2024-11-07 11:20:11 +01:00
Reordered player remove call for QueryService
This is to avoid issues where deletion needs username from the plan database.
This commit is contained in:
parent
b073b23832
commit
2f4a53711e
@ -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();
|
||||
|
@ -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();
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user