From a1d4f2ec005081863bee441d1f91fce48d64ee9d Mon Sep 17 00:00:00 2001 From: Zrips Date: Mon, 15 Apr 2024 18:38:27 +0300 Subject: [PATCH] Extra check for negative values, just in case. --- src/main/java/com/gamingmesh/jobs/config/ShopManager.java | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/main/java/com/gamingmesh/jobs/config/ShopManager.java b/src/main/java/com/gamingmesh/jobs/config/ShopManager.java index 9bdc2278..5891d307 100644 --- a/src/main/java/com/gamingmesh/jobs/config/ShopManager.java +++ b/src/main/java/com/gamingmesh/jobs/config/ShopManager.java @@ -212,12 +212,12 @@ public class ShopManager { } } - if (item.getPointPrice() > 0 && jPlayer.getPointsData().getCurrentPoints() < item.getPointPrice()) { + if (item.getPointPrice() > 0 && (jPlayer.getPointsData().getCurrentPoints() <= 0 || jPlayer.getPointsData().getCurrentPoints() < item.getPointPrice())) { player.sendMessage(Jobs.getLanguage().getMessage("command.shop.info.NoPoints")); return; } - if (item.getVaultPrice() > 0 && jPlayer.getBalance() < item.getVaultPrice()) { + if (item.getVaultPrice() > 0 && (jPlayer.getBalance() <= 0 || jPlayer.getBalance() < item.getVaultPrice())) { player.sendMessage(Jobs.getLanguage().getMessage("command.shop.info.NoMoney")); return; }