mirror of
https://github.com/VolmitSoftware/Iris.git
synced 2025-12-25 18:19:14 +00:00
option picking auto-pick nr1 for consoles
Consoles cannot pick options, so we select the first option for them.
This commit is contained in:
@@ -518,6 +518,13 @@ public class VirtualDecreeCommand {
|
||||
}
|
||||
|
||||
private String pickValidOption(VolmitSender sender, KList<?> validOptions, DecreeParameterHandler<?> handler, String name, String type) {
|
||||
|
||||
if (!sender.isPlayer()) {
|
||||
sender.sendMessage(C.YELLOW + "There were multiple (" + validOptions.size() + ") options for '" + name + "' (of type '" + type + "'), but we selected '" + handler.toStringForce(validOptions.get(0)) + "'");
|
||||
return handler.toStringForce(validOptions.get(0));
|
||||
}
|
||||
|
||||
|
||||
sender.sendHeader("Pick a " + name + " (" + type + ")");
|
||||
sender.sendMessageRaw("<gradient:#1ed497:#b39427>This query will expire in 15 seconds.</gradient>");
|
||||
String password = UUID.randomUUID().toString().replaceAll("\\Q-\\E", "");
|
||||
|
||||
Reference in New Issue
Block a user