Fix another legacy converter NPE

This commit is contained in:
Jesse Boyd 2019-04-01 04:43:44 +11:00
parent e396da8ee5
commit 67cf1b45ed
No known key found for this signature in database
GPG Key ID: 59F1DE6293AF6E1F

View File

@ -113,12 +113,14 @@ import java.util.Map;
for (final String world : worlds) {
final ConfigurationSection worldSection = configuration.getConfigurationSection(world);
for (final Map.Entry<String, ConfigurationType> entry : TYPE_MAP.entrySet()) {
if (entry.getValue() == ConfigurationType.BLOCK) {
this.convertBlock(worldSection, entry.getKey(),
worldSection.getString(entry.getKey()));
} else {
this.convertBlockList(worldSection, entry.getKey(),
worldSection.getStringList(entry.getKey()));
if (worldSection.contains(entry.getKey())) {
if (entry.getValue() == ConfigurationType.BLOCK) {
this.convertBlock(worldSection, entry.getKey(),
worldSection.getString(entry.getKey()));
} else {
this.convertBlockList(worldSection, entry.getKey(),
worldSection.getStringList(entry.getKey()));
}
}
}
}