Skip to content

Commit

Permalink
Check for async command completion before sleeping (#431)
Browse files Browse the repository at this point in the history
  • Loading branch information
SirYwell authored Jul 29, 2024
1 parent 9262175 commit 7076811
Showing 1 changed file with 4 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -372,6 +372,10 @@ public CompletableFuture<Void> executeCommand(CommandSender sender, String[] arg
int warningIntervalSeconds = 5;

try {
if (completed.get()) {
return;
}

for (int i = 1; i <= 3; i++) {
try {
Thread.sleep(warningIntervalSeconds * 1000);
Expand Down

0 comments on commit 7076811

Please sign in to comment.