From 3dc5f713ab9ed99de2066ce2852d418a91fc6c30 Mon Sep 17 00:00:00 2001 From: Ghoulboy Date: Mon, 3 Aug 2020 06:32:26 +0200 Subject: [PATCH] added "ops" setting to each rule (#390) * added "ops" setting to each rule * removing changes * implementing gnembon's fix * removing unnecessary stuffs * removing unnecessary changes v2 * removing unnecessary changes v3 * Separating bool from command --- src/main/java/carpet/settings/ParsedRule.java | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/src/main/java/carpet/settings/ParsedRule.java b/src/main/java/carpet/settings/ParsedRule.java index f25b0a38..54d352b7 100644 --- a/src/main/java/carpet/settings/ParsedRule.java +++ b/src/main/java/carpet/settings/ParsedRule.java @@ -61,9 +61,12 @@ public final class ParsedRule implements Comparable { { this.options = ImmutableList.copyOf(rule.options()); } - else if (this.type == boolean.class || (this.type == String.class && categories.contains(RuleCategory.COMMAND))) + else if (this.type == boolean.class){ + this.options = ImmutableList.of("true","false"); + } + else if(this.type == String.class && categories.contains(RuleCategory.COMMAND)) { - this.options = ImmutableList.of("true", "false"); + this.options = ImmutableList.of("true", "false", "ops"); } else if (this.type.isEnum()) {