We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent f877b3f commit 853a3b4Copy full SHA for 853a3b4
src/main/java/pro/cloudnode/smp/bankaccounts/integrations/PAPIIntegration.java
@@ -51,6 +51,17 @@ yield switch (args[1]) {
51
);
52
yield null;
53
}
54
+ case "short" -> {
55
+ if (args.length == 3)
56
+ yield Account.get(Account.Tag.from(args[2])).map(value -> BankAccounts.formatCurrencyShort(value.balance)).orElse(null);
57
+ if (args.length == 2)
58
+ yield BankAccounts.formatCurrencyShort(
59
+ Arrays.stream(Account.get(player))
60
+ .map(account -> account.balance)
61
+ .reduce(BigDecimal.ZERO, BigDecimal::add)
62
+ );
63
+ yield null;
64
+ }
65
default -> Account.get(Account.Tag.from(args[1])).map(value -> String.valueOf(value.balance)).orElse(null);
66
};
67
0 commit comments