From 03ecf8fe8214b4e98ff62812f1430472dcf608f1 Mon Sep 17 00:00:00 2001 From: CocoTheOwner Date: Mon, 27 Sep 2021 15:41:15 +0200 Subject: [PATCH] Better headers & warnings --- .../util/decree/virtual/VirtualDecreeCommand.java | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) diff --git a/src/main/java/com/volmit/iris/util/decree/virtual/VirtualDecreeCommand.java b/src/main/java/com/volmit/iris/util/decree/virtual/VirtualDecreeCommand.java index 0c23da9b8..df422c1b6 100644 --- a/src/main/java/com/volmit/iris/util/decree/virtual/VirtualDecreeCommand.java +++ b/src/main/java/com/volmit/iris/util/decree/virtual/VirtualDecreeCommand.java @@ -521,10 +521,12 @@ public class VirtualDecreeCommand { int tries = 3; KList options = validOptions.convert(handler::toStringForce); String result = null; - while (tries-- > 0 && (result == null || !options.contains(result))) { - sender.sendHeader("Pick a " + name + " (" + type + ")"); - sender.sendMessageRaw("This query will expire in 15 seconds."); + sender.sendHeader("Pick a " + name + " (" + type + ")"); + sender.sendMessageRaw("This query will expire in 15 seconds."); + + while (tries-- > 0 && (result == null || !options.contains(result))) { + sender.sendMessage("Please pick a valid option."); String password = UUID.randomUUID().toString().replaceAll("\\Q-\\E", ""); int m = 0; @@ -554,6 +556,9 @@ public class VirtualDecreeCommand { if (result != null && options.contains(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;