Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -1029,6 +1029,8 @@ private RequirementList getRequirements(FileConfiguration c, String path) {
case STRING_DOES_NOT_CONTAIN:
case STRING_DOES_NOT_EQUAL:
case STRING_DOES_NOT_EQUAL_IGNORECASE:
case STRING_CONTAINS_IGNORECASE:
case STRING_DOES_NOT_CONTAIN_IGNORECASE:
if (c.contains(rPath + ".input") && c.contains(rPath + ".output")) {
req = new InputResultRequirement(type, c.getString(rPath + ".input"), c.getString(rPath + ".output"));
} else {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,10 @@ public boolean evaluate(MenuHolder holder) {
return !parsedInput.equals(parsedResult);
case STRING_DOES_NOT_EQUAL_IGNORECASE:
return !parsedInput.equalsIgnoreCase(parsedResult);
case STRING_CONTAINS_IGNORECASE:
return parsedInput.toLowerCase().contains(parsedResult.toLowerCase());
case STRING_DOES_NOT_CONTAIN_IGNORECASE:
return !parsedInput.toLowerCase().contains(parsedResult.toLowerCase());
default:
break;
}
Expand Down Expand Up @@ -79,3 +83,4 @@ public boolean evaluate(MenuHolder holder) {
return false;
}
}

Original file line number Diff line number Diff line change
Expand Up @@ -51,6 +51,10 @@ public enum RequirementType {
"Checks if a string contains another string", Arrays.asList("input", "output")),
STRING_DOES_NOT_CONTAIN(Arrays.asList("!string contains", "!stringcontains", "!contains"),
"Checks if a string does not contain another string", Arrays.asList("input", "output")),
STRING_CONTAINS_IGNORECASE(Arrays.asList("string contains ignorecase", "stringcontainsignorecase", "containsignorecase"),
"Checks if a string contains another string ignoring case", Arrays.asList("input", "output")),
STRING_DOES_NOT_CONTAIN_IGNORECASE(Arrays.asList("!string contains ignorecase", "!stringcontainsignorecase", "!containsignorecase"),
"Checks if a string does not contain another string ignoring case", Arrays.asList("input", "output")),
STRING_EQUALS(Arrays.asList("string equals", "stringequals", "equals"),
"Checks if a string equals another string", Arrays.asList("input", "output")),
STRING_DOES_NOT_EQUAL(Arrays.asList("!string equals", "!stringequals", "!equals"),
Expand Down Expand Up @@ -122,3 +126,4 @@ public List<String> getConfigOptions() {
return configOptions;
}
}

Loading