Skip to content

Commit

Permalink
Change rawCond to unparsedCondition
Browse files Browse the repository at this point in the history
  • Loading branch information
Pikachu920 committed Jan 18, 2024
1 parent 67735a3 commit e032545
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions src/main/java/ch/njol/skript/expressions/ExprFilter.java
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,7 @@ public class ExprFilter extends SimpleExpression<Object> {
}

private Condition filterCondition;
private String rawCond;
private String unparsedCondition;
private Expression<Object> unfilteredObjects;

private FilterData filterData;
Expand All @@ -70,10 +70,10 @@ public boolean init(Expression<?>[] exprs, int matchedPattern, Kleenean isDelaye
unfilteredObjects = LiteralUtils.defendExpression(exprs[0]);
if (unfilteredObjects.isSingle())
return false;
rawCond = parseResult.regexes.get(0).group();
unparsedCondition = parseResult.regexes.get(0).group();
filterData = getParser().getData(FilterData.class);
filterData.parentFilter = this;
filterCondition = Condition.parse(rawCond, "Can't understand this condition: " + rawCond);
filterCondition = Condition.parse(unparsedCondition, "Can't understand this condition: " + unparsedCondition);
filterData.parentFilter = null;
return filterCondition != null && LiteralUtils.canInitSafely(unfilteredObjects);
}
Expand Down Expand Up @@ -111,7 +111,7 @@ public boolean isSingle() {

@Override
public String toString(Event event, boolean debug) {
return String.format("%s where [%s]", unfilteredObjects.toString(event, debug), rawCond);
return unfilteredObjects.toString(event, debug) + " that match [" + unparsedCondition + "]";
}

private boolean matchesAnySpecifiedTypes(String candidateString) {
Expand Down

0 comments on commit e032545

Please sign in to comment.