Skip to content

Commit

Permalink
deny non-noted cuboids for in:area switch
Browse files Browse the repository at this point in the history
  • Loading branch information
mcmonkey4eva committed Oct 3, 2019
1 parent 72f7e47 commit 572da3b
Showing 1 changed file with 8 additions and 0 deletions.
Expand Up @@ -259,10 +259,18 @@ else if (WorldTag.matches(it)) {
}
else if (CuboidTag.matches(it)) {
CuboidTag cuboid = CuboidTag.valueOf(it);
if (cuboid == null || !cuboid.isUnique()) {
Debug.echoError("Invalid event 'in:<area>' switch [" + getName() + "] (invalid cuboid): '" + path.event + "' for " + path.container.getName());
return false;
}
return cuboid.isInsideCuboid(location);
}
else if (EllipsoidTag.matches(it)) {
EllipsoidTag ellipsoid = EllipsoidTag.valueOf(it);
if (ellipsoid == null || !ellipsoid.isUnique()) {
Debug.echoError("Invalid event 'in:<area>' switch [" + getName() + "] (invalid ellipsoid): '" + path.event + "' for " + path.container.getName());
return false;
}
return ellipsoid.contains(location);
}
else {
Expand Down

0 comments on commit 572da3b

Please sign in to comment.