Fixes deprecated getLevelsData method.

Tested with Biomes 1.7.0.
This commit is contained in:
tastybento 2020-08-21 16:40:32 -07:00
parent 284f18c680
commit 8f85e90830
1 changed files with 6 additions and 0 deletions

View File

@ -338,6 +338,12 @@ public class Level extends Addon implements Listener {
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;