Skip to content
Merged
Changes from 1 commit
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
Prev Previous commit
Adding a name null check too
  • Loading branch information
N1Ran committed May 5, 2019
commit 08e82d69d619e4e11c98772f03c5c22a9e409aa5
3 changes: 2 additions & 1 deletion Essentials/Commands/WorldModule.cs
Original file line number Diff line number Diff line change
Expand Up @@ -147,7 +147,8 @@ public void FactionInfo()
sb.AppendLine($"{faction.Tag} - {memberCount} players in this faction");
foreach (var player in faction?.Members)
{
if (!MySession.Static.Players.HasIdentity(player.Key) && !MySession.Static.Players.IdentityIsNpc(player.Key)) continue; //This is needed to filter out players with no id.
if (!MySession.Static.Players.HasIdentity(player.Key) && !MySession.Static.Players.IdentityIsNpc(player.Key)||
string.IsNullOrEmpty(MySession.Static?.Players?.TryGetIdentity(player.Value.PlayerId).DisplayName)) continue; //This is needed to filter out players with no id.
sb.AppendLine($"{MySession.Static?.Players?.TryGetIdentity(player.Value.PlayerId).DisplayName}");
}
}
Expand Down