mirror of
https://github.com/Zrips/Jobs.git
synced 2024-11-29 05:55:27 +01:00
Null check
This commit is contained in:
parent
aaab2fe06c
commit
36957f83b3
@ -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)));
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user