diff --git a/plugin/src/main/java/org/battleplugins/arena/competition/map/LiveCompetitionMap.java b/plugin/src/main/java/org/battleplugins/arena/competition/map/LiveCompetitionMap.java index ac4a8765..28c23bda 100644 --- a/plugin/src/main/java/org/battleplugins/arena/competition/map/LiveCompetitionMap.java +++ b/plugin/src/main/java/org/battleplugins/arena/competition/map/LiveCompetitionMap.java @@ -54,6 +54,7 @@ public class LiveCompetitionMap implements ArenaLike, CompetitionMap, PostProces private Spawns spawns; private World mapWorld; + private World parentWorld; public LiveCompetitionMap() { } @@ -158,6 +159,18 @@ public final World getWorld() { return this.mapWorld; } + /** + * Gets the parent world of the map. + *
+ * This is the world that the map is located in, or the parent world + * if the map is a dynamic map. + * + * @return the parent world of the map + */ + public final World getParentWorld() { + return this.parentWorld == null ? this.mapWorld : this.parentWorld; + } + /** * Gets the {@link Bounds} of the map. *