From c44ff5c890a508fedad9deba75491a412d478b25 Mon Sep 17 00:00:00 2001 From: EpicKnarvik97 Date: Tue, 15 Mar 2022 14:20:14 +0100 Subject: [PATCH] Fixes a bug preventing default option states for paid sign conditions --- .../java/net/knarcraft/paidsigns/command/EditCommand.java | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/main/java/net/knarcraft/paidsigns/command/EditCommand.java b/src/main/java/net/knarcraft/paidsigns/command/EditCommand.java index dd8250c..c5a8d67 100644 --- a/src/main/java/net/knarcraft/paidsigns/command/EditCommand.java +++ b/src/main/java/net/knarcraft/paidsigns/command/EditCommand.java @@ -157,10 +157,10 @@ public class EditCommand extends TokenizedCommand { condition.getStringToMatch(); boolean executeRegEx = property == PaidSignConditionProperty.EXECUTE_REG_EX ? Boolean.parseBoolean(newValue) : condition.executeRegex(); - boolean ignoreCase = property == PaidSignConditionProperty.IGNORE_CASE ? Boolean.parseBoolean(newValue) : - condition.ignoreCase(); - boolean ignoreColor = property == PaidSignConditionProperty.IGNORE_COLOR ? Boolean.parseBoolean(newValue) : - condition.ignoreColor(); + boolean ignoreCase = property == PaidSignConditionProperty.IGNORE_CASE ? OptionState.getBooleanValue( + OptionState.fromString(newValue), sign.getIgnoreCase()) : condition.ignoreCase(); + boolean ignoreColor = property == PaidSignConditionProperty.IGNORE_COLOR ? OptionState.getBooleanValue( + OptionState.fromString(newValue), sign.getIgnoreColor()) : condition.ignoreColor(); //Make sure to test the regular expression in case anything changed if (executeRegEx && isRegExInvalid(sender, stringToMatch)) {