mirror of
https://github.com/plan-player-analytics/Plan.git
synced 2025-02-04 22:41:41 +01:00
Added progress messages to export players command
This commit is contained in:
parent
228e2d509c
commit
5ef3c64dc3
@ -137,6 +137,8 @@ public class ManageExportCommand extends CommandNode {
|
||||
Boolean exportPlayerHTML = config.get(ExportSettings.PLAYER_PAGES);
|
||||
processing.submitNonCritical(() -> {
|
||||
Map<UUID, String> players = dbSystem.getDatabase().query(UserIdentifierQueries.fetchAllPlayerNames());
|
||||
int size = players.size();
|
||||
int i = 1;
|
||||
for (Map.Entry<UUID, String> entry : players.entrySet()) {
|
||||
if (exportPlayerJSON) {
|
||||
jsonExport.exportPlayerJSON(entry.getKey());
|
||||
@ -144,6 +146,10 @@ public class ManageExportCommand extends CommandNode {
|
||||
if (exportPlayerHTML) {
|
||||
htmlExport.exportPlayerPage(entry.getKey(), entry.getValue());
|
||||
}
|
||||
i++;
|
||||
if (i % 1000 == 0) {
|
||||
sender.sendMessage(i + " / " + size + " processed..");
|
||||
}
|
||||
}
|
||||
sender.sendMessage(locale.getString(ManageLang.PROGRESS_SUCCESS));
|
||||
});
|
||||
|
Loading…
Reference in New Issue
Block a user