diff --git a/TShockAPI/ConfigFile.cs b/TShockAPI/ConfigFile.cs index 1c9bccbe..2f99581d 100644 --- a/TShockAPI/ConfigFile.cs +++ b/TShockAPI/ConfigFile.cs @@ -95,7 +95,7 @@ namespace TShockAPI public string MediumcoreBanReason = "Death results in a ban"; public string MediumcoreKickReason = "Death results in a kick"; public string ProjectileAbuseReason = "Projectile abuse"; - + public string TileAbuseReason = "Tile abuse ({0})"; public bool EnableDNSHostResolution; diff --git a/TShockAPI/GetDataHandlers.cs b/TShockAPI/GetDataHandlers.cs index ab621e69..557cde13 100644 --- a/TShockAPI/GetDataHandlers.cs +++ b/TShockAPI/GetDataHandlers.cs @@ -335,6 +335,12 @@ namespace TShockAPI return true; } } + if (type == 3) + if (tiletype >= Main.maxWallTypes) + { + Tools.HandleGriefer(args.Player, string.Format(TShock.Config.TileAbuseReason, "Wall type out of bounds")); + return true; + } if (!args.Player.Group.HasPermission("editspawn") && !TShock.Regions.CanBuild(x, y, args.Player) && TShock.Regions.InArea(x, y)) { if ((DateTime.UtcNow - args.Player.LastTileChangeNotify).TotalMilliseconds > 1000)