diff --git a/TShockAPI/ConfigFile.cs b/TShockAPI/ConfigFile.cs index 22d5f9ef..c4ad5de8 100644 --- a/TShockAPI/ConfigFile.cs +++ b/TShockAPI/ConfigFile.cs @@ -211,6 +211,9 @@ namespace TShockAPI [Description("Some weapons override the range checks, however malicious users can take advantage of this and send lots of packets of certain types. Disabling this will turn off weapons that affect this.")] public bool EnableRangeCheckOverrides = true; + [Description("Disabling this prevents players from being banned or kicked based on item stacks.")] + public bool EnableItemStackChecks = true; + public static ConfigFile Read(string path) { if (!File.Exists(path)) diff --git a/TShockAPI/GetDataHandlers.cs b/TShockAPI/GetDataHandlers.cs index b8e24b82..6bc62f20 100644 --- a/TShockAPI/GetDataHandlers.cs +++ b/TShockAPI/GetDataHandlers.cs @@ -160,7 +160,10 @@ namespace TShockAPI if (stack>it.maxStack) { string reason = string.Format("Item Stack Hack Detected: player has {0} {1}(s) in one stack", stack,itemname); - TShock.Utils.HandleCheater(args.Player, reason); + if (TShock.Config.EnableItemStackChecks) + { + TShock.Utils.HandleCheater(args.Player, reason); + } } return false;