1
0
mirror of https://github.com/Zrips/Jobs.git synced 2024-11-25 20:16:13 +01:00

Extra check for negative values, just in case.

This commit is contained in:
Zrips 2024-04-15 18:38:27 +03:00
parent 618921ea10
commit a1d4f2ec00

View File

@ -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;
}