diff --git a/TShockAPI/ConfigFile.cs b/TShockAPI/ConfigFile.cs index 993fdd68..9bcd30f6 100644 --- a/TShockAPI/ConfigFile.cs +++ b/TShockAPI/ConfigFile.cs @@ -153,6 +153,8 @@ namespace TShockAPI [Description("")] public string TileAbuseReason = "Tile abuse ({0})"; [Description("")] + public string GriefClientReason = "Grief client detected ({0})"; + [Description("")] public bool EnableDNSHostResolution; [Description("")] public bool EnableBanOnUsernames; diff --git a/TShockAPI/GetDataHandlers.cs b/TShockAPI/GetDataHandlers.cs index 33f2b7eb..e1cbaf15 100644 --- a/TShockAPI/GetDataHandlers.cs +++ b/TShockAPI/GetDataHandlers.cs @@ -114,7 +114,7 @@ namespace TShockAPI {PacketTypes.ChestGetContents, HandleChest}, {PacketTypes.SignNew, HandleSign}, {PacketTypes.PlayerSlot, HandlePlayerSlot}, - {PacketTypes.TileGetSection, HandleGetSection} + {PacketTypes.TileGetSection, HandleGetSection}, }; } @@ -152,9 +152,10 @@ namespace TShockAPI string itemname = Encoding.ASCII.GetString(args.Data.ReadBytes(namelength)); if (!args.Player.Group.HasPermission(Permissions.usebanneditem) && TShock.Itembans.ItemIsBanned(itemname)) - { args.Player.Disconnect("Using banned item: " + itemname + ", remove it and rejoin"); - } + if (itemname == "KANNIBALE BLADE" + || itemname == "Super Gel") + return Tools.HandleCheater(args.Player, string.Format(TShock.Config.GriefClientReason, "KANNIBALE")); } return false;