From 3036d4fa9097800373d706a8e05764b8cc240da2 Mon Sep 17 00:00:00 2001 From: Glitchfinder Date: Sat, 23 Feb 2013 13:51:21 -0800 Subject: [PATCH] Fixing an IllegalArgumentException related to custom repair configs. --- src/main/java/com/gmail/nossr50/config/ConfigLoader.java | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/src/main/java/com/gmail/nossr50/config/ConfigLoader.java b/src/main/java/com/gmail/nossr50/config/ConfigLoader.java index f5d18a530..6d1620e63 100644 --- a/src/main/java/com/gmail/nossr50/config/ConfigLoader.java +++ b/src/main/java/com/gmail/nossr50/config/ConfigLoader.java @@ -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 configKeys = config.getKeys(true); Set internalConfigKeys = internalConfig.getKeys(true);