Remove Utils.ActivePlayers

Duplicated what an array already stored and told us, but added code and
was obscure. It predated TSPlayers existing.
This commit is contained in:
Lucas Nicodemus 2017-12-26 21:14:16 -07:00
parent 9648e9ac0c
commit b613fdcda6
6 changed files with 11 additions and 19 deletions

View file

@ -1946,7 +1946,7 @@ namespace TShockAPI
if (OnGetSection(args.Player, args.Data, args.Data.ReadInt32(), args.Data.ReadInt32()))
return true;
if (TShock.Utils.ActivePlayers() + 1 > TShock.Config.MaxSlots &&
if (TShock.Players.Length + 1 > TShock.Config.MaxSlots &&
!args.Player.HasPermission(Permissions.reservedslot))
{
TShock.Utils.ForceKick(args.Player, TShock.Config.ServerFullReason, true);