From be19c3998b08e71263e94d99136043945b65434f Mon Sep 17 00:00:00 2001 From: Lucas Nicodemus Date: Thu, 16 Apr 2015 23:41:24 -0600 Subject: [PATCH] Call OnPlayerLogout when a player leaves the server Fixes #902 --- TShockAPI/TShock.cs | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/TShockAPI/TShock.cs b/TShockAPI/TShock.cs index 9d6601f9..771a61a6 100755 --- a/TShockAPI/TShock.cs +++ b/TShockAPI/TShock.cs @@ -1004,6 +1004,7 @@ namespace TShockAPI private void OnLeave(LeaveEventArgs args) { var tsplr = Players[args.Who]; + Hooks.PlayerHooks.OnPlayerLogout(tsplr); Players[args.Who] = null; if (tsplr != null && tsplr.ReceivedInfo) @@ -1028,7 +1029,7 @@ namespace TShockAPI tsplr.tempGroupTimer.Stop(); } } - + // The last player will leave after this hook is executed. if (Utils.ActivePlayers() == 1) {