mirror of
https://github.com/Melledy/Grasscutter.git
synced 2024-11-30 18:42:12 +00:00
List command should show player uid
This commit is contained in:
parent
2fd73e043a
commit
caffe859b8
@ -19,8 +19,19 @@ public final class ListCommand implements CommandHandler {
|
|||||||
|
|
||||||
if (playersMap.size() != 0) {
|
if (playersMap.size() != 0) {
|
||||||
StringBuilder playerSet = new StringBuilder();
|
StringBuilder playerSet = new StringBuilder();
|
||||||
playersMap.values().forEach(player ->
|
playersMap.values().forEach(player -> {
|
||||||
playerSet.append(player.getNickname()).append(", "));
|
playerSet.append(player.getNickname());
|
||||||
|
|
||||||
|
if (sender != null) {
|
||||||
|
playerSet.append("<color=green><UID:")
|
||||||
|
.append(player.getUid())
|
||||||
|
.append("></color>, ");
|
||||||
|
} else {
|
||||||
|
playerSet.append("<UID:")
|
||||||
|
.append(player.getUid())
|
||||||
|
.append(">, ");
|
||||||
|
}
|
||||||
|
});
|
||||||
|
|
||||||
String players = playerSet.toString();
|
String players = playerSet.toString();
|
||||||
CommandHandler.sendMessage(sender, players.substring(0, players.length() - 2));
|
CommandHandler.sendMessage(sender, players.substring(0, players.length() - 2));
|
||||||
|
Loading…
Reference in New Issue
Block a user