Skip to content

Commit c3d7444

Browse files
committed
fix: use Account#name() to get account name or fall-back to ID
1 parent 853a3b4 commit c3d7444

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/main/java/pro/cloudnode/smp/bankaccounts/integrations/PAPIIntegration.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -67,7 +67,7 @@ yield switch (args[1]) {
6767
}
6868
case "owner" -> args.length != 2 ? null : Account.get(Account.Tag.from(args[1])).map(value -> value.owner.getName()).orElse(null);
6969
case "type" -> args.length != 2 ? null : Account.get(Account.Tag.from(args[1])).map(value -> value.type.getName()).orElse(null);
70-
case "name" -> args.length != 2 ? null : Account.get(Account.Tag.from(args[1])).map(value -> value.name).orElse(null);
70+
case "name" -> args.length != 2 ? null : Account.get(Account.Tag.from(args[1])).map(Account::name).orElse(null);
7171
case "account" -> {
7272
if (args.length == 2) {
7373
final @NotNull Account @NotNull [] accounts = Account.get(player);

0 commit comments

Comments
 (0)