fix other NPE

This commit is contained in:
Jesse Boyd 2016-06-21 13:32:28 +10:00
parent e08db3d12b
commit 88d8339cfd

View File

@ -140,7 +140,8 @@ public class MainCommand extends Command {
if (EconHandler.manager != null) {
PlotArea area = player.getApplicablePlotArea();
if (area != null) {
Double price = area.PRICES.get(cmd.getFullId()).evalute(0d);
Expression<Double> priceEval = area.PRICES.get(cmd.getFullId());
Double price = priceEval != null ? priceEval.evalute(0d) : 0d;
if (price != null && EconHandler.manager.getMoney(player) < price) {
if (failure != null) {
failure.run();