Fixing an IllegalArgumentException related to custom repair configs.

This commit is contained in:
Glitchfinder 2013-02-23 13:51:21 -08:00
parent aba662e3d0
commit 3036d4fa90

View File

@ -46,7 +46,13 @@ public abstract class ConfigLoader {
}
config = YamlConfiguration.loadConfiguration(configFile);
FileConfiguration internalConfig = YamlConfiguration.loadConfiguration(plugin.getResource(fileName));
InputStream resource = plugin.getResource(fileName);
if (resource == null) {
return;
}
FileConfiguration internalConfig = YamlConfiguration.loadConfiguration(resource);
Set<String> configKeys = config.getKeys(true);
Set<String> internalConfigKeys = internalConfig.getKeys(true);