mirror of
https://github.com/VolmitSoftware/Iris.git
synced 2025-07-18 18:23:06 +00:00
Better headers & warnings
This commit is contained in:
parent
1c03a7fc5c
commit
03ecf8fe82
@ -521,10 +521,12 @@ public class VirtualDecreeCommand {
|
|||||||
int tries = 3;
|
int tries = 3;
|
||||||
KList<String> options = validOptions.convert(handler::toStringForce);
|
KList<String> options = validOptions.convert(handler::toStringForce);
|
||||||
String result = null;
|
String result = null;
|
||||||
while (tries-- > 0 && (result == null || !options.contains(result))) {
|
|
||||||
|
|
||||||
sender.sendHeader("Pick a " + name + " (" + type + ")");
|
sender.sendHeader("Pick a " + name + " (" + type + ")");
|
||||||
sender.sendMessageRaw("<gradient:#1ed497:#b39427>This query will expire in 15 seconds.</gradient>");
|
sender.sendMessageRaw("<gradient:#1ed497:#b39427>This query will expire in 15 seconds.</gradient>");
|
||||||
|
|
||||||
|
while (tries-- > 0 && (result == null || !options.contains(result))) {
|
||||||
|
sender.sendMessage("<gradient:#1ed497:#b39427>Please pick a valid option.");
|
||||||
String password = UUID.randomUUID().toString().replaceAll("\\Q-\\E", "");
|
String password = UUID.randomUUID().toString().replaceAll("\\Q-\\E", "");
|
||||||
int m = 0;
|
int m = 0;
|
||||||
|
|
||||||
@ -554,6 +556,9 @@ public class VirtualDecreeCommand {
|
|||||||
|
|
||||||
if (result != null && options.contains(result)) {
|
if (result != null && options.contains(result)) {
|
||||||
return result;
|
return result;
|
||||||
|
} else {
|
||||||
|
sender.sendMessage(C.RED + "You did not enter a correct option within 3 tries.");
|
||||||
|
sender.sendMessage(C.RED + "Please double-check your arguments & option picking.");
|
||||||
}
|
}
|
||||||
|
|
||||||
return null;
|
return null;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user