From cdeec8aa040079c6e9890bc1ed22d90979a6978e Mon Sep 17 00:00:00 2001 From: AkjaHAsLk1IALk0MasH <46046453+AgaSpace@users.noreply.github.com> Date: Tue, 30 Nov 2021 20:53:19 +0700 Subject: [PATCH] Added protection in OnKillMe --- TShockAPI/Bouncer.cs | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/TShockAPI/Bouncer.cs b/TShockAPI/Bouncer.cs index 2145b373..3216d769 100644 --- a/TShockAPI/Bouncer.cs +++ b/TShockAPI/Bouncer.cs @@ -2279,6 +2279,12 @@ namespace TShockAPI args.Handled = true; return; } + if (TShock.Config.Settings.DisableCustomDeathMessages && playerDeathReason._sourceCustomReason != null) + { + TShock.Log.ConsoleDebug("Bouncer / OnKillMe rejected custom death message from {0}", args.Player.Name); + args.Handled = true; + return; + } } }