diff --git a/TShockAPI/Bouncer.cs b/TShockAPI/Bouncer.cs index 4e270763..a0a9c10c 100644 --- a/TShockAPI/Bouncer.cs +++ b/TShockAPI/Bouncer.cs @@ -847,15 +847,15 @@ namespace TShockAPI if (distance > TShock.Config.MaxRangeForDisabled) { // We need to tell them they were disabled and why, then revert the change. - if (args.Player.IsDisabledForStackDetection == true) + if (args.Player.IsDisabledForStackDetection) { args.Player.SendErrorMessage("Disabled. You went too far with hacked item stacks."); } - else if (args.Player.IgnoreActionsForDisabledArmor != "none") + else if (args.Player.IsDisabledForBannedWearable) { - args.Player.SendErrorMessage("Disabled for banned armor: " + args.Player.IgnoreActionsForDisabledArmor); + args.Player.SendErrorMessage("Disabled. You went too far with banned armor."); } - else if (args.Player.IsDisabledForSSC == true) + else if (args.Player.IsDisabledForSSC) { args.Player.SendErrorMessage("Disabled. You need to {0}login, since server side characters is enabled.", TShock.Config.CommandSpecifier); } diff --git a/TShockAPI/Commands.cs b/TShockAPI/Commands.cs index c76dabe3..5a5dc183 100644 --- a/TShockAPI/Commands.cs +++ b/TShockAPI/Commands.cs @@ -865,7 +865,7 @@ namespace TShockAPI args.Player.IsDisabledForStackDetection = false; if (args.Player.HasPermission(Permissions.usebanneditem)) - args.Player.IgnoreActionsForDisabledArmor = "none"; + args.Player.IsDisabledForBannedWearable = false; args.Player.SendSuccessMessage("Authenticated as " + account.Name + " successfully."); diff --git a/TShockAPI/GetDataHandlers.cs b/TShockAPI/GetDataHandlers.cs index 1fb9c2ba..a48867d5 100644 --- a/TShockAPI/GetDataHandlers.cs +++ b/TShockAPI/GetDataHandlers.cs @@ -1801,7 +1801,7 @@ namespace TShockAPI args.Player.IsDisabledForStackDetection = false; if (args.Player.HasPermission(Permissions.usebanneditem)) - args.Player.IgnoreActionsForDisabledArmor = "none"; + args.Player.IsDisabledForBannedWearable = false; args.Player.SendSuccessMessage("Authenticated as " + account.Name + " successfully."); TShock.Log.ConsoleInfo(args.Player.Name + " authenticated successfully as user " + args.Player.Name + "."); @@ -1873,7 +1873,7 @@ namespace TShockAPI args.Player.IsDisabledForStackDetection = false; if (args.Player.HasPermission(Permissions.usebanneditem)) - args.Player.IgnoreActionsForDisabledArmor = "none"; + args.Player.IsDisabledForBannedWearable = false; args.Player.SendMessage("Authenticated as " + args.Player.Name + " successfully.", Color.LimeGreen); diff --git a/TShockAPI/TSPlayer.cs b/TShockAPI/TSPlayer.cs index 43bdad2f..7215e0c3 100644 --- a/TShockAPI/TSPlayer.cs +++ b/TShockAPI/TSPlayer.cs @@ -283,7 +283,8 @@ namespace TShockAPI /// Determines if the player is disabled by Bouncer for having hacked item stacks. public bool IsDisabledForStackDetection = false; - public string IgnoreActionsForDisabledArmor = "none"; + /// 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; @@ -299,7 +300,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 || IgnoreActionsForDisabledArmor != "none" || IgnoreActionsForClearingTrashCan || !IsLoggedIn && TShock.Config.RequireLogin; + return IsDisabledForSSC || IsDisabledForStackDetection || IsDisabledForBannedWearable || IgnoreActionsForClearingTrashCan || !IsLoggedIn && TShock.Config.RequireLogin; } /// diff --git a/TShockAPI/TShock.cs b/TShockAPI/TShock.cs index 1db6ae71..0a955930 100644 --- a/TShockAPI/TShock.cs +++ b/TShockAPI/TShock.cs @@ -1161,7 +1161,7 @@ namespace TShockAPI break; } } - player.IgnoreActionsForDisabledArmor = check; + player.IsDisabledForBannedWearable = true; if (player.CheckIgnores()) {