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: case JailPayCurrency:
if(global.contains(s.getString())) { if(global.contains(s.getString())) {
c.set(Settings.JAILPAYITEM.getPath(), Material.getMaterial(OldSettings.getGlobalInt(global, s)).toString().toLowerCase()); Material mat = Material.getMaterial(OldSettings.getGlobalInt(global, s));
pl.debug(Settings.JAILPAYPRICEINFINITE.getPath() + " <-- " + s.getString()); if(mat != null) {
count++; c.set(Settings.JAILPAYITEM.getPath(), mat.toString().toLowerCase());
pl.debug(Settings.JAILPAYPRICEINFINITE.getPath() + " <-- " + s.getString());
count++;
}
} }
default: default:
break; break;