Merge pull request #2894 from sgkoishi/saveonlyafterjoin

Add a check to InsertPlayerData to prevent data overwrite
This commit is contained in:
Chris 2023-03-25 15:34:22 +10:30 committed by GitHub
commit 20bb8c4eb5
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -189,6 +189,9 @@ namespace TShockAPI.DB
if (!player.IsLoggedIn)
return false;
if (player.State < 10)
return false;
if (player.HasPermission(Permissions.bypassssc) && !fromCommand)
{
TShock.Log.ConsoleInfo(GetParticularString("{0} is a player name", $"Skipping SSC save (due to tshock.ignore.ssc) for {player.Account.Name}"));