diff --git a/changelog.md b/changelog.md index 04a730c..efbd022 100644 --- a/changelog.md +++ b/changelog.md @@ -11,6 +11,7 @@ These changes will (most likely) be included in the next version. ## [Unreleased] +- Arenas with missing regions no longer cause errors in the region overlap check. ## [0.104.1] - 2019-12-31 - It is no longer necessary to have recurrent waves for an arena to work. MobArena automatically creates a "catch all" recurrent wave in case the arena session reaches a wave number that isn't covered by any other wave definitions. diff --git a/src/main/java/com/garbagemule/MobArena/region/ArenaRegion.java b/src/main/java/com/garbagemule/MobArena/region/ArenaRegion.java index d9462c5..a0b5ad1 100644 --- a/src/main/java/com/garbagemule/MobArena/region/ArenaRegion.java +++ b/src/main/java/com/garbagemule/MobArena/region/ArenaRegion.java @@ -248,7 +248,10 @@ public class ArenaRegion return true; } } - return intersects(p1, p2, other.p1, other.p2); + if (setup && other.setup) { + return intersects(p1, p2, other.p1, other.p2); + } + return false; } private boolean intersects(Location a1, Location a2, Location b1, Location b2) {