Added protection in OnKillMe

This commit is contained in:
AkjaHAsLk1IALk0MasH 2021-11-30 20:53:19 +07:00
parent 8f69c6e767
commit cdeec8aa04

View file

@ -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;
}
}
}