From 93013b2db1d8f916c00ef0e12f35c8dc7ed5689c Mon Sep 17 00:00:00 2001 From: TfT_02 Date: Sun, 21 Dec 2014 17:50:31 +0100 Subject: [PATCH] Fix an NPE when loading potion configs --- .../gmail/nossr50/config/skills/alchemy/PotionConfig.java | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/main/java/com/gmail/nossr50/config/skills/alchemy/PotionConfig.java b/src/main/java/com/gmail/nossr50/config/skills/alchemy/PotionConfig.java index 515b8e3b3..a97c8e229 100644 --- a/src/main/java/com/gmail/nossr50/config/skills/alchemy/PotionConfig.java +++ b/src/main/java/com/gmail/nossr50/config/skills/alchemy/PotionConfig.java @@ -117,7 +117,10 @@ public class PotionConfig extends ConfigLoader { try { short dataValue = Short.parseShort(potion_section.getName()); - String name = ChatColor.translateAlternateColorCodes('&', potion_section.getString("Name")); + String name = potion_section.getString("Name"); + if (name != null) { + name = ChatColor.translateAlternateColorCodes('&', name); + } List lore = new ArrayList(); if (potion_section.contains("Lore")) {