Fix SaveManager saving when 1 player is on the server and another joins
The real fix would be to fix ServerLeave to not fire incorrectly when a player joins, but this will do for now.
This commit is contained in:
parent
15b53ab726
commit
331eeb8cec
1 changed files with 7 additions and 2 deletions
|
|
@ -1405,9 +1405,14 @@ namespace TShockAPI
|
|||
}
|
||||
|
||||
var tsplr = Players[args.Who];
|
||||
if (tsplr == null)
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
Players[args.Who] = null;
|
||||
|
||||
if (tsplr != null && tsplr.ReceivedInfo)
|
||||
if (tsplr.ReceivedInfo)
|
||||
{
|
||||
if (!tsplr.SilentKickInProgress && tsplr.State >= 3)
|
||||
Utils.Broadcast(tsplr.Name + " has left.", Color.Yellow);
|
||||
|
|
@ -1431,7 +1436,7 @@ namespace TShockAPI
|
|||
}
|
||||
|
||||
// Fire the OnPlayerLogout hook too, if the player was logged in and they have a TSPlayer object.
|
||||
if (tsplr != null && tsplr.IsLoggedIn)
|
||||
if (tsplr.IsLoggedIn)
|
||||
{
|
||||
Hooks.PlayerHooks.OnPlayerLogout(tsplr);
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue