summaryrefslogtreecommitdiffstats
path: root/src/Broadcaster.cpp
diff options
context:
space:
mode:
authorNiLSPACE <NiLSPACE@users.noreply.github.com>2021-03-11 22:26:35 +0100
committerGitHub <noreply@github.com>2021-03-11 22:26:35 +0100
commitc729d7abde7773df1bd88ce8d2c064ec5a3ae77f (patch)
tree9d4ce3445940637cf4eee3debedc4b52e5e0be31 /src/Broadcaster.cpp
parentDo protocol decryption in-place (with CryptoAPI on Windows) (#5145) (diff)
downloadcuberite-c729d7abde7773df1bd88ce8d2c064ec5a3ae77f.tar
cuberite-c729d7abde7773df1bd88ce8d2c064ec5a3ae77f.tar.gz
cuberite-c729d7abde7773df1bd88ce8d2c064ec5a3ae77f.tar.bz2
cuberite-c729d7abde7773df1bd88ce8d2c064ec5a3ae77f.tar.lz
cuberite-c729d7abde7773df1bd88ce8d2c064ec5a3ae77f.tar.xz
cuberite-c729d7abde7773df1bd88ce8d2c064ec5a3ae77f.tar.zst
cuberite-c729d7abde7773df1bd88ce8d2c064ec5a3ae77f.zip
Diffstat (limited to 'src/Broadcaster.cpp')
-rw-r--r--src/Broadcaster.cpp5
1 files changed, 5 insertions, 0 deletions
diff --git a/src/Broadcaster.cpp b/src/Broadcaster.cpp
index c8d2de615..1e9f9b876 100644
--- a/src/Broadcaster.cpp
+++ b/src/Broadcaster.cpp
@@ -186,6 +186,11 @@ void cWorld::BroadcastBossBarUpdateHealth(const cEntity & a_Entity, UInt32 a_Uni
void cWorld::BroadcastChat(const AString & a_Message, const cClientHandle * a_Exclude, eMessageType a_ChatPrefix)
{
+ if ((a_ChatPrefix == mtDeath) && !ShouldBroadcastDeathMessages())
+ {
+ return;
+ }
+
ForClientsInWorld(*this, a_Exclude, [&](cClientHandle & a_Client)
{
a_Client.SendChat(a_Message, a_ChatPrefix);