From 30fcf83fa1f9260b6585291244a98fbc2f8e031a Mon Sep 17 00:00:00 2001 From: ProfessorXZ Date: Sun, 14 Aug 2016 23:21:17 +0200 Subject: [PATCH] Clients are no longer able to bypass tile checks --- TShockAPI/GetDataHandlers.cs | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/TShockAPI/GetDataHandlers.cs b/TShockAPI/GetDataHandlers.cs index 5b4fb7c6..a3dd6f28 100755 --- a/TShockAPI/GetDataHandlers.cs +++ b/TShockAPI/GetDataHandlers.cs @@ -2048,6 +2048,13 @@ namespace TShockAPI return true; } + // If they aren't selecting the item which creates the correct tile or wall, they're hacking. + if (editData != (action == EditAction.PlaceTile ? selectedItem.createTile : selectedItem.createWall)) + { + args.Player.SendTileSquare(tileX, tileY, 4); + return true; + } + // If they aren't selecting the item which creates the tile or wall, they're hacking. if ((editData != TileID.MagicalIceBlock && editData != TileID.Rope