mirror of
https://github.com/VolmitSoftware/Iris.git
synced 2025-07-18 10:12:53 +00:00
Only accept posted console option picking when valid result
This commit is contained in:
parent
734c0a37f7
commit
85fe65612e
@ -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) {
|
||||
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user