Skip to content
Closed
Changes from all commits
Commits
File filter

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
13 changes: 10 additions & 3 deletions Essentials/Commands/AdminModule.cs
Original file line number Diff line number Diff line change
Expand Up @@ -64,10 +64,17 @@ public void ListPlayers()
return;
}
StringBuilder sb = new StringBuilder();
foreach(var player in MySession.Static.Players.GetOnlinePlayers())
var players = MySession.Static.Players.GetOnlinePlayers();
if (players.Count == 0)
{
sb.AppendLine();
sb.AppendLine($"{player.DisplayName}");
Context.Respond("No Players Online");
return;
}

sb.AppendLine($"Found {players.Count} Players on server");
foreach(var player in players)
{
sb.AppendLine($"{player.DisplayName} : {player.Id.SteamId}");
}
if (Context.Player == null)
Context.Respond(sb.ToString());
Expand Down