Added a configuration option for disabling item stack checks.
This commit is contained in:
parent
83013f66d4
commit
d05d18214e
2 changed files with 7 additions and 1 deletions
|
|
@ -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))
|
||||
|
|
|
|||
|
|
@ -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;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue