mirror of
https://github.com/PolyhedralDev/Terra.git
synced 2025-07-03 16:35:50 +00:00
fix bukkit impl
This commit is contained in:
parent
4db469199c
commit
ed2e56c776
@ -205,11 +205,10 @@ public class TerraBukkitPlugin extends JavaPlugin {
|
||||
|
||||
@Override
|
||||
public @Nullable
|
||||
ChunkGenerator getDefaultWorldGenerator(@NotNull String worldName, @Nullable String id) {
|
||||
ChunkGenerator getDefaultWorldGenerator(@NotNull String worldName, String id) {
|
||||
return new BukkitChunkGeneratorWrapper(generatorMap.computeIfAbsent(worldName, name -> {
|
||||
if(!terraPlugin.getConfigRegistry().contains(id)) throw new IllegalArgumentException("No such config pack \"" + id + "\"");
|
||||
ConfigPack pack = terraPlugin.getConfigRegistry().get(id);
|
||||
ConfigPack pack = terraPlugin.getConfigRegistry().get(id).orElseThrow(() -> new IllegalArgumentException("No such config pack \"" + id + "\""));
|
||||
return pack.getGeneratorProvider().newInstance(pack);
|
||||
}), terraPlugin.getRawConfigRegistry().get(id));
|
||||
}), terraPlugin.getRawConfigRegistry().get(id).orElseThrow());
|
||||
}
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user