diff --git a/com/gamingmesh/jobs/container/JobsPlayer.java b/com/gamingmesh/jobs/container/JobsPlayer.java index 45dbe915..38e0166c 100644 --- a/com/gamingmesh/jobs/container/JobsPlayer.java +++ b/com/gamingmesh/jobs/container/JobsPlayer.java @@ -92,6 +92,8 @@ public class JobsPlayer { if (paymentLimits == null) { paymentLimits = Jobs.getJobsDAO().getPlayersLimits(this); } + if (paymentLimits == null) + paymentLimits = new PaymentData(); return paymentLimits; } @@ -105,8 +107,8 @@ public class JobsPlayer { if (!limit.isEnabled()) return true; PaymentData data = getPaymentLimit(); - - if (data.IsReachedLimit(type, this.limits.get(type))) { + Integer value = this.limits.get(type); + if (data.IsReachedLimit(type, value == null ? 0 : value)) { if (player.isOnline() && !data.isInformed() && !data.isReseted()) { player.sendMessage(Jobs.getLanguage().getMessage("command.limit.output.reached" + type.getName().toLowerCase() + "limit")); player.sendMessage(Jobs.getLanguage().getMessage("command.limit.output.reached" + type.getName().toLowerCase() + "limit2"));