Fix info message when there are more than one client

This commit is contained in:
Xujiayao 2026-03-13 20:43:46 +08:00
parent 6433349651
commit fc6612f8ac
3 changed files with 3 additions and 5 deletions

View file

@ -43,9 +43,7 @@ public class InfoCommand implements Command {
infoSnapshot.values().stream()
.sorted(Comparator.comparing(packet -> packet.serverName == null ? "" : packet.serverName, String.CASE_INSENSITIVE_ORDER))
.forEach(packet -> {
if (!clientsBuilder.isEmpty()) {
clientsBuilder.append("\n");
}
clientsBuilder.append(" ");
clientsBuilder.append(buildServerClientInfo(packet));
});
clientsInfo = clientsBuilder.toString();

View file

@ -64,7 +64,7 @@ commands:
base: |
[DMCC Server]
Online clients: ({}/{})
{}
{}
no_clients: "- No DMCC clients online."
clients: |
- [{}]

View file

@ -64,7 +64,7 @@ commands:
base: |
[DMCC 服务端]
在线客户端:({}/{})
{}
{}
no_clients: "- 当前没有在线 DMCC 客户端。"
clients: |
- [{}]