Skip to content

Commit a7fa49c

Browse files
authored
CondIsWithin replace getArray with getAll (#7945)
replace getArray with getAll
1 parent 36b57d8 commit a7fa49c

File tree

2 files changed

+7
-3
lines changed

2 files changed

+7
-3
lines changed

src/main/java/ch/njol/skript/conditions/CondIsWithin.java

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -99,7 +99,7 @@ public boolean check(Event event) {
9999
return locsToCheck.check(event, box::contains, isNegated());
100100
}
101101

102-
Object[] areas = area.getArray(event);
102+
Object[] areas = area.getAll(event);
103103
return locsToCheck.check(event, location ->
104104
SimpleExpression.check(areas, object -> {
105105
if (object instanceof Entity entity) {
@@ -120,8 +120,8 @@ public boolean check(Event event) {
120120
} else if (object instanceof World world) {
121121
return location.getWorld().equals(world);
122122
} else if (object instanceof WorldBorder worldBorder) {
123-
return worldBorder.isInside(location);
124-
}
123+
return worldBorder.isInside(location);
124+
}
125125
return false;
126126
}, false, area.getAnd()),
127127
isNegated());
Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
test "CondIsWithin or lists":
2+
set {_loc} to spawn of world "world"
3+
loop 10 times:
4+
assert {_loc} is within world "world", world "world_nether", or world "world_the_end" with "within or list failed"

0 commit comments

Comments
 (0)