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