Add a check to InsertPlayerData to prevent data overwrite

This commit is contained in:
Stargazing Koishi 2023-01-11 02:23:01 -08:00 committed by GitHub
parent 6e589ffaee
commit fc4c509285
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}"));