mirror of
https://github.com/Multiverse/Multiverse-Core.git
synced 2024-11-07 03:11:02 +01:00
Fixed NPE when there was no worlds-section in bukkit.yml
This commit is contained in:
parent
0fa8f4e824
commit
459aad2d2b
@ -57,9 +57,11 @@ public class WorldManager implements MVWorldManager {
|
||||
});
|
||||
if (files.length == 1) {
|
||||
FileConfiguration bukkitConfig = YamlConfiguration.loadConfiguration(files[0]);
|
||||
Set<String> keys = bukkitConfig.getConfigurationSection("worlds").getKeys(false);
|
||||
for (String key : keys) {
|
||||
defaultGens.put(key, bukkitConfig.getString("worlds." + key + ".generator", ""));
|
||||
if (bukkitConfig.isConfigurationSection("worlds")) {
|
||||
Set<String> keys = bukkitConfig.getConfigurationSection("worlds").getKeys(false);
|
||||
for (String key : keys) {
|
||||
defaultGens.put(key, bukkitConfig.getString("worlds." + key + ".generator", ""));
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user