Merge pull request #449 from Browsit/ver/6.5.0

Prevent exception with other world generators
This commit is contained in:
Zoë
2024-02-23 14:58:51 +00:00
committed by GitHub

View File

@@ -189,6 +189,7 @@ public class TerraBukkitPlugin extends JavaPlugin {
@Override
public @Nullable
ChunkGenerator getDefaultWorldGenerator(@NotNull String worldName, String id) {
if (id == null || id.trim().equals("")) { return null; }
return new BukkitChunkGeneratorWrapper(generatorMap.computeIfAbsent(worldName, name -> {
ConfigPack pack = platform.getConfigRegistry().getByID(id).orElseThrow(
() -> new IllegalArgumentException("No such config pack \"" + id + "\""));