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
This commit is contained in:
1 parent
a322752549
commit
3dc5f713ab
1 file changed
+5
-2
@@ -61,10 +61,13 @@ public final class ParsedRule<T> implements Comparable<ParsedRule> {
|
||||
{
|
||||
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", "ops");
|
||||
}
|
||||
else if (this.type.isEnum())
|
||||
{
|
||||
this.options = Arrays.stream(this.type.getEnumConstants()).map(e -> ((Enum) e).name().toLowerCase(Locale.ROOT)).collect(ImmutableList.toImmutableList());
|
||||
|
||||
Reference in new issue
Block a user