From bd2aafe01a99e1a682074ec5989647735e88a433 Mon Sep 17 00:00:00 2001 From: BuildTools Date: Wed, 7 May 2025 15:25:49 +0200 Subject: [PATCH] Fix console title not updating and world not saving when the last player disconnects --- TShockAPI/TShock.cs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/TShockAPI/TShock.cs b/TShockAPI/TShock.cs index bd2a113e..e2dd3aa1 100644 --- a/TShockAPI/TShock.cs +++ b/TShockAPI/TShock.cs @@ -1469,8 +1469,8 @@ namespace TShockAPI Hooks.PlayerHooks.OnPlayerLogout(tsplr); } - // The last player will leave after this hook is executed. - if (Utils.GetActivePlayerCount() == 1) + // If this is the last player online, update the console title and save the world if needed + if (Utils.GetActivePlayerCount() == 0) { if (Config.Settings.SaveWorldOnLastPlayerExit) SaveManager.Instance.SaveWorld();