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:
parent
618921ea10
commit
a1d4f2ec00
@ -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;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user