Skip to content

Commit 35dd7cf

Browse files
committed
fix merge again
1 parent 11a31d0 commit 35dd7cf

File tree

2 files changed

+7
-2
lines changed

2 files changed

+7
-2
lines changed

src/main/java/ch/njol/skript/ScriptLoader.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1227,4 +1227,4 @@ public static File getScriptFromName(String script) {
12271227
}
12281228
}
12291229

1230-
}
1230+
}

src/main/java/ch/njol/skript/conditions/base/PropertyCondition.java

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -180,6 +180,7 @@ public static String[] getPatterns(PropertyType propertyType, String property, S
180180

181181
@Override
182182
public boolean init(Expression<?>[] expressions, int matchedPattern, Kleenean isDelayed, ParseResult parseResult) {
183+
//noinspection unchecked
183184
expr = (Expression<? extends T>) expressions[0];
184185
setNegated(matchedPattern == 1);
185186
return true;
@@ -194,7 +195,11 @@ public final boolean check(Event event) {
194195

195196
@Override
196197
public final boolean test(T value) {
197-
return this.check(value);
198+
if (isNegated()) {
199+
return !this.check(value);
200+
} else {
201+
return this.check(value);
202+
}
198203
}
199204

200205
protected abstract String getPropertyName();

0 commit comments

Comments
 (0)