Skip to content

Commit

Permalink
Fixes deprecated getLevelsData method.
Browse files Browse the repository at this point in the history
Tested with Biomes 1.7.0.
  • Loading branch information
tastybento committed Aug 21, 2020
1 parent 284f18c commit 8f85e90
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions src/main/java/world/bentobox/level/Level.java
Original file line number Diff line number Diff line change
Expand Up @@ -338,6 +338,12 @@ public LevelsData getLevelsData(UUID targetPlayer) {
getPlugin().getAddonsManager().getGameModeAddons().stream()
.filter(gm -> !settings.getGameModes().contains(gm.getDescription().getName()))
.forEach(gm -> {
if (getSettings().isZeroNewIslandLevels()) {
Island island = getIslands().getIsland(gm.getOverWorld(), targetPlayer);
if (island != null) {
ld.setInitialLevel(gm.getOverWorld(), this.getInitialIslandLevel(island));
}
}
ld.setLevel(gm.getOverWorld(), this.getIslandLevel(gm.getOverWorld(), targetPlayer));
});
return ld;
Expand Down

0 comments on commit 8f85e90

Please sign in to comment.