mirror of
https://github.com/VolmitSoftware/Iris.git
synced 2025-12-25 18:19:14 +00:00
Only accept posted console option picking when valid result
This commit is contained in:
@@ -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