mirror of
https://github.com/VolmitSoftware/Iris.git
synced 2026-10-20 15:26:51 +00:00
Only accept posted console option picking when valid result
This commit is contained in:
1 parent
734c0a37f7
commit
85fe65612e
1 file changed
+2
-1
@@ -546,7 +546,8 @@ public class VirtualDecreeCommand {
|
||||
CompletableFuture<String> future = new CompletableFuture<>();
|
||||
Iris.service(CommandSVC.class).postConsole(future);
|
||||
try {
|
||||
return future.get(15, TimeUnit.SECONDS);
|
||||
String result = future.get(15, TimeUnit.SECONDS);
|
||||
return validOptions.convert(handler::toStringForce).contains(result) ? result : null;
|
||||
} catch (InterruptedException | ExecutionException | TimeoutException ignored) {
|
||||
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user