From 4f66e660d48d99f7251a85648645b62b6acf5ed8 Mon Sep 17 00:00:00 2001 From: Patrikkk Date: Tue, 9 Jun 2020 00:01:57 +0200 Subject: [PATCH] Bouncer OnTileEdit - Add tile replace action to tileban check. Tiny change, but a pressing matter. My smallest PR ever? hahah. --- CHANGELOG.md | 1 + TShockAPI/Bouncer.cs | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index e9883b79..c73fa5b3 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -4,6 +4,7 @@ This is the rolling changelog for TShock for Terraria. Use past tense when addin ## Upcoming changes * Installed new sprinklers! +* Fix issue where players could replace tiles with banned tiles without permission. (@Patrikkk) ## TShock 4.4.0 (Pre-release 11) * New permission `tshock.tp.pylon` to enable teleporting via Teleportation Pylons (@QuiCM) diff --git a/TShockAPI/Bouncer.cs b/TShockAPI/Bouncer.cs index 117c8aac..3a0fa623 100644 --- a/TShockAPI/Bouncer.cs +++ b/TShockAPI/Bouncer.cs @@ -259,7 +259,7 @@ namespace TShockAPI int lastKilledProj = args.Player.LastKilledProjectile; ITile tile = Main.tile[tileX, tileY]; - if (action == EditAction.PlaceTile) + if (action == EditAction.PlaceTile || action == EditAction.ReplaceTile) { if (TShock.TileBans.TileIsBanned(editData, args.Player)) {