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

Null check

This commit is contained in:
Zrips 2024-08-15 20:43:08 +03:00
parent aaab2fe06c
commit 36957f83b3

View File

@ -125,15 +125,15 @@ public class JobsPaymentVisualizationListener implements Listener {
StringBuilder message = new StringBuilder();
double money = payment.get(CurrencyType.MONEY);
double money = payment.getOrDefault(CurrencyType.MONEY, 0D);
if (money != 0D)
message.append(Jobs.getLanguage().getMessage("command.toggle.output.paid.ACmoney", "[amount]", String.format(Jobs.getGCManager().getDecimalPlacesMoney(), money)));
double exp = payment.get(CurrencyType.EXP);
double exp = payment.getOrDefault(CurrencyType.EXP, 0D);
if (exp != 0D)
message.append(Jobs.getLanguage().getMessage("command.toggle.output.paid.ACexp", "[exp]", String.format(Jobs.getGCManager().getDecimalPlacesExp(), exp)));
double points = payment.get(CurrencyType.POINTS);
double points = payment.getOrDefault(CurrencyType.POINTS, 0D);
if (points != 0D)
message.append(Jobs.getLanguage().getMessage("command.toggle.output.paid.ACpoints", "[points]", String.format(Jobs.getGCManager().getDecimalPlacesPoints(), points)));