Use same TSPlayer.Active check
This commit is contained in:
parent
c6b60e22d7
commit
59f9440d17
4 changed files with 12 additions and 12 deletions
|
|
@ -172,7 +172,7 @@ namespace TShockAPI
|
|||
foreach (TSPlayer player in TShock.Players)
|
||||
{
|
||||
if (player != null && player != excludedPlayer && player.Active && player.HasPermission(Permissions.logs) &&
|
||||
player.DisplayLogs && TShock.Config.Settings.DisableSpewLogs == false)
|
||||
player.DisplayLogs && !TShock.Config.Settings.DisableSpewLogs)
|
||||
player.SendMessage(log, color);
|
||||
}
|
||||
}
|
||||
|
|
@ -183,7 +183,7 @@ namespace TShockAPI
|
|||
/// <returns>The number of active players on the server.</returns>
|
||||
public int GetActivePlayerCount()
|
||||
{
|
||||
return Main.player.Where(p => null != p && p.active).Count();
|
||||
return TShock.Players.Count(p => null != p && p.Active);
|
||||
}
|
||||
|
||||
//Random should not be generated in a method
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue