mirror of
https://gitlab.com/SamB440/rpgregions-2.git
synced 2025-12-27 10:49:08 +00:00
Only show async execution time if specified
This commit is contained in:
@@ -186,8 +186,10 @@ public class RPGRegionsCommand extends BaseCommand {
|
||||
long mainTotalTime = mainEndTime - startTime;
|
||||
saveFuture.thenAccept(saved -> {
|
||||
long asyncTotalTime = System.currentTimeMillis() - asyncStartTime;
|
||||
sender.sendMessage(ChatColor.GREEN + "Done! (" + mainTotalTime + "ms) "
|
||||
+ ChatColor.GOLD + "(async execution took " + asyncTotalTime + "ms)");
|
||||
StringBuilder sb = new StringBuilder();
|
||||
sb.append(ChatColor.GREEN).append("Done! (%sms)".formatted(mainTotalTime));
|
||||
if (async) sb.append(' ').append(ChatColor.GOLD).append("(async execution took %sms)".formatted(asyncTotalTime));
|
||||
sender.sendMessage(sb.toString());
|
||||
});
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user