Fix an NPE when loading potion configs

This commit is contained in:
TfT_02 2014-12-21 17:50:31 +01:00
parent d5a2dea06b
commit 93013b2db1

View File

@ -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<String> lore = new ArrayList<String>();
if (potion_section.contains("Lore")) {