diff --git a/TShockAPI/TShock.cs b/TShockAPI/TShock.cs index 4b8b9240..841c4372 100755 --- a/TShockAPI/TShock.cs +++ b/TShockAPI/TShock.cs @@ -807,10 +807,12 @@ namespace TShockAPI string check = "none"; foreach (Item item in player.TPlayer.inventory) { - if (!player.Group.HasPermission(Permissions.ignorestackhackdetection) && item.stack > item.maxStack && + if (!player.Group.HasPermission(Permissions.ignorestackhackdetection) && (item.stack > item.maxStack || item.stack < 0) && item.type != 0) { check = "Remove item " + item.name + " (" + item.stack + ") exceeds max stack of " + item.maxStack; + player.SendErrorMessage(check); + break; } } player.IgnoreActionsForCheating = check; @@ -822,6 +824,9 @@ namespace TShockAPI player.SetBuff(30, 120); //Bleeding player.SetBuff(36, 120); //Broken Armor check = "Remove armor/accessory " + item.name; + + player.SendErrorMessage(string.Format("You are wearing banned equipment. {0}", check)); + break; } } player.IgnoreActionsForDisabledArmor = check;