Skip to content

Commit

Permalink
Add method to get parent world from competition map
Browse files Browse the repository at this point in the history
  • Loading branch information
Redned235 committed Aug 25, 2024
1 parent fa011ce commit 3ecf30d
Showing 1 changed file with 13 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -54,6 +54,7 @@ public class LiveCompetitionMap implements ArenaLike, CompetitionMap, PostProces
private Spawns spawns;

private World mapWorld;
private World parentWorld;

public LiveCompetitionMap() {
}
Expand Down Expand Up @@ -158,6 +159,18 @@ public final World getWorld() {
return this.mapWorld;
}

/**
* Gets the parent world of the map.
* <p>
* 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.
*
Expand Down

0 comments on commit 3ecf30d

Please sign in to comment.