From 6ca2a28b885570d1544a05c2b430d4cd26251ce7 Mon Sep 17 00:00:00 2001 From: Etzelia Date: Fri, 4 Oct 2019 22:01:58 -0500 Subject: [PATCH] Fix confirmation check Signed-off-by: Etzelia --- .../xyz/etztech/qol/listeners/CommandPreprocessListener.java | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/main/java/xyz/etztech/qol/listeners/CommandPreprocessListener.java b/src/main/java/xyz/etztech/qol/listeners/CommandPreprocessListener.java index ad2e3e4..d9566c6 100644 --- a/src/main/java/xyz/etztech/qol/listeners/CommandPreprocessListener.java +++ b/src/main/java/xyz/etztech/qol/listeners/CommandPreprocessListener.java @@ -80,7 +80,9 @@ public class CommandPreprocessListener implements Listener { if (sender.hasPermission("qol.specconfirm")) { boolean confirm = false; for (String confirmable : specConfirm) { - if (noSlash(command).toLowerCase().startsWith(confirmable.toLowerCase())) { + // If the player command either starts with a confirmable command and space (meaning confirmation is needed regardless of arguments) + // Or the player command is a full match to the confirmable command + if (noSlash(command).toLowerCase().startsWith(confirmable.toLowerCase() + " ") || noSlash(command).toLowerCase().equals(confirmable.toLowerCase())) { confirm = true; } }