From 5302f808d7d08565ad198c8357f194bef941840d Mon Sep 17 00:00:00 2001 From: Magnus Ulf Date: Fri, 8 Feb 2019 12:29:39 +0100 Subject: [PATCH] Fix bug in confirmation util --- src/com/massivecraft/massivecore/util/ConfirmationUtil.java | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/com/massivecraft/massivecore/util/ConfirmationUtil.java b/src/com/massivecraft/massivecore/util/ConfirmationUtil.java index bd5fe666..e7945937 100644 --- a/src/com/massivecraft/massivecore/util/ConfirmationUtil.java +++ b/src/com/massivecraft/massivecore/util/ConfirmationUtil.java @@ -103,9 +103,9 @@ public class ConfirmationUtil boolean hasConfirmationString = hasConfirmationString(object, sender); boolean hasTypedConfirmationString = object.argIsSet(idx); - boolean hasTypedOther = object.argIsSet(idx-1); + boolean hasTypedOther = idx == 0 || object.argIsSet(idx-1); - // Assetion should not happen + // Assertion should not happen if (hasTypedConfirmationString && !hasTypedOther) throw new RuntimeException(); if (!hasTypedOther)