diff --git a/TShockAPI/Bouncer.cs b/TShockAPI/Bouncer.cs index a0a9c10c..4447c273 100644 --- a/TShockAPI/Bouncer.cs +++ b/TShockAPI/Bouncer.cs @@ -863,7 +863,7 @@ namespace TShockAPI { args.Player.SendErrorMessage("Please /register or /login to play!"); } - else if (args.Player.IgnoreActionsForClearingTrashCan) + else if (args.Player.IsDisabledPendingTrashRemoval) { args.Player.SendErrorMessage("You need to rejoin to ensure your trash can is cleared!"); } diff --git a/TShockAPI/Commands.cs b/TShockAPI/Commands.cs index 5a5dc183..542d3367 100644 --- a/TShockAPI/Commands.cs +++ b/TShockAPI/Commands.cs @@ -1636,7 +1636,7 @@ namespace TShockAPI args.Player.SendSuccessMessage("SSC has been saved."); foreach (TSPlayer player in TShock.Players) { - if (player != null && player.IsLoggedIn && !player.IgnoreActionsForClearingTrashCan) + if (player != null && player.IsLoggedIn && !player.IsDisabledPendingTrashRemoval) { TShock.CharacterDB.InsertPlayerData(player, true); } @@ -1681,7 +1681,7 @@ namespace TShockAPI args.Player.SendErrorMessage("Player \"{0}\" has to perform a /login attempt first.", matchedPlayer.Name); return; } - if (matchedPlayer.IgnoreActionsForClearingTrashCan) + if (matchedPlayer.IsDisabledPendingTrashRemoval) { args.Player.SendErrorMessage("Player \"{0}\" has to reconnect first.", matchedPlayer.Name); return; @@ -1887,7 +1887,7 @@ namespace TShockAPI { foreach (TSPlayer player in TShock.Players) { - if (player != null && player.IsLoggedIn && !player.IgnoreActionsForClearingTrashCan) + if (player != null && player.IsLoggedIn && !player.IsDisabledPendingTrashRemoval) { player.SaveServerCharacter(); } diff --git a/TShockAPI/GetDataHandlers.cs b/TShockAPI/GetDataHandlers.cs index a48867d5..f08e9772 100644 --- a/TShockAPI/GetDataHandlers.cs +++ b/TShockAPI/GetDataHandlers.cs @@ -1612,7 +1612,7 @@ namespace TShockAPI args.Player.HasSentInventory && !args.Player.HasPermission(Permissions.bypassssc)) { // The player might have moved an item to their trash can before they performed a single login attempt yet. - args.Player.IgnoreActionsForClearingTrashCan = true; + args.Player.IsDisabledPendingTrashRemoval = true; } if (slot == 58) //this is the hand diff --git a/TShockAPI/TSPlayer.cs b/TShockAPI/TSPlayer.cs index 7215e0c3..fc543bd5 100644 --- a/TShockAPI/TSPlayer.cs +++ b/TShockAPI/TSPlayer.cs @@ -286,7 +286,8 @@ namespace TShockAPI /// Determines if the player is disabled by the item bans system for having banned wearables on the server. public bool IsDisabledForBannedWearable = false; - public bool IgnoreActionsForClearingTrashCan; + /// Determines if the player is disabled for not clearing their trash. A re-login is the only way to reset this. + public bool IsDisabledPendingTrashRemoval; /// Checks to see if active throttling is happening on events by Bouncer. Rejects repeated events by malicious clients in a short window. /// If the player is currently being throttled by Bouncer, or not. @@ -300,7 +301,7 @@ namespace TShockAPI /// bool - True if any ignore is not none, false, or login state differs from the required state. public bool CheckIgnores() { - return IsDisabledForSSC || IsDisabledForStackDetection || IsDisabledForBannedWearable || IgnoreActionsForClearingTrashCan || !IsLoggedIn && TShock.Config.RequireLogin; + return IsDisabledForSSC || IsDisabledForStackDetection || IsDisabledForBannedWearable || IsDisabledPendingTrashRemoval || !IsLoggedIn && TShock.Config.RequireLogin; } /// @@ -660,7 +661,7 @@ namespace TShockAPI if (Main.ServerSideCharacter) { IsDisabledForSSC = true; - if (!IgnoreActionsForClearingTrashCan && (!Dead || TPlayer.difficulty != 2)) + if (!IsDisabledPendingTrashRemoval && (!Dead || TPlayer.difficulty != 2)) { PlayerData.CopyCharacter(this); TShock.CharacterDB.InsertPlayerData(this); diff --git a/TShockAPI/TShock.cs b/TShockAPI/TShock.cs index 0a955930..be0e880c 100644 --- a/TShockAPI/TShock.cs +++ b/TShockAPI/TShock.cs @@ -945,7 +945,7 @@ namespace TShockAPI foreach (TSPlayer player in Players) { // prevent null point exceptions - if (player != null && player.IsLoggedIn && !player.IgnoreActionsForClearingTrashCan) + if (player != null && player.IsLoggedIn && !player.IsDisabledPendingTrashRemoval) { CharacterDB.InsertPlayerData(player); @@ -1409,7 +1409,7 @@ namespace TShockAPI Utils.Broadcast(tsplr.Name + " has left.", Color.Yellow); Log.Info("{0} disconnected.", tsplr.Name); - if (tsplr.IsLoggedIn && !tsplr.IgnoreActionsForClearingTrashCan && Main.ServerSideCharacter && (!tsplr.Dead || tsplr.TPlayer.difficulty != 2)) + if (tsplr.IsLoggedIn && !tsplr.IsDisabledPendingTrashRemoval && Main.ServerSideCharacter && (!tsplr.Dead || tsplr.TPlayer.difficulty != 2)) { tsplr.PlayerData.CopyCharacter(tsplr); CharacterDB.InsertPlayerData(tsplr);