Attempt to fix the NPE error when loading the old JailPayCurrency

This commit is contained in:
graywolf336 2014-05-03 01:15:00 -05:00
parent ef5dfe3815
commit 7db5fe9da5

View File

@ -406,9 +406,12 @@ public class LegacyManager {
}
case JailPayCurrency:
if(global.contains(s.getString())) {
c.set(Settings.JAILPAYITEM.getPath(), Material.getMaterial(OldSettings.getGlobalInt(global, s)).toString().toLowerCase());
pl.debug(Settings.JAILPAYPRICEINFINITE.getPath() + " <-- " + s.getString());
count++;
Material mat = Material.getMaterial(OldSettings.getGlobalInt(global, s));
if(mat != null) {
c.set(Settings.JAILPAYITEM.getPath(), mat.toString().toLowerCase());
pl.debug(Settings.JAILPAYPRICEINFINITE.getPath() + " <-- " + s.getString());
count++;
}
}
default:
break;