diff --git a/Bukkit/src/main/java/com/plotsquared/bukkit/generator/BukkitPlotGenerator.java b/Bukkit/src/main/java/com/plotsquared/bukkit/generator/BukkitPlotGenerator.java index 767bcd375..da97ac621 100644 --- a/Bukkit/src/main/java/com/plotsquared/bukkit/generator/BukkitPlotGenerator.java +++ b/Bukkit/src/main/java/com/plotsquared/bukkit/generator/BukkitPlotGenerator.java @@ -37,6 +37,7 @@ import com.sk89q.worldedit.math.BlockVector2; import org.apache.logging.log4j.LogManager; import org.apache.logging.log4j.Logger; import org.bukkit.HeightMap; +import org.bukkit.Registry; import org.bukkit.World; import org.bukkit.block.Biome; import org.bukkit.generator.BiomeProvider; @@ -48,9 +49,11 @@ import org.jetbrains.annotations.NotNull; import org.jetbrains.annotations.Nullable; import java.util.ArrayList; +import java.util.Arrays; import java.util.List; import java.util.Random; import java.util.Set; +import java.util.stream.Collectors; public class BukkitPlotGenerator extends ChunkGenerator implements GeneratorWrapper { @@ -434,9 +437,9 @@ public class BukkitPlotGenerator extends ChunkGenerator implements GeneratorWrap private static final List BIOMES; static { - ArrayList biomes = new ArrayList<>(List.of(Biome.values())); - biomes.remove(Biome.CUSTOM); - BIOMES = List.copyOf(biomes); + BIOMES = Arrays.stream(Biome.values()) + .filter(b -> Registry.BIOME.get(b.getKey()) != null) + .collect(Collectors.toList()); } @Override