summaryrefslogtreecommitdiffstats
path: root/src/Broadcaster.cpp
diff options
context:
space:
mode:
author12xx12 <44411062+12xx12@users.noreply.github.com>2021-03-05 16:08:30 +0100
committerGitHub <noreply@github.com>2021-03-05 16:08:30 +0100
commit8405b8969f205ffae219361dfc03f3b4c680ce73 (patch)
treecc1aef4347d9e399b80a32afa16b657885fd3603 /src/Broadcaster.cpp
parentAdd Mushrooms to Generator and fixed up the roofed forest (#5134) (diff)
downloadcuberite-8405b8969f205ffae219361dfc03f3b4c680ce73.tar
cuberite-8405b8969f205ffae219361dfc03f3b4c680ce73.tar.gz
cuberite-8405b8969f205ffae219361dfc03f3b4c680ce73.tar.bz2
cuberite-8405b8969f205ffae219361dfc03f3b4c680ce73.tar.lz
cuberite-8405b8969f205ffae219361dfc03f3b4c680ce73.tar.xz
cuberite-8405b8969f205ffae219361dfc03f3b4c680ce73.tar.zst
cuberite-8405b8969f205ffae219361dfc03f3b4c680ce73.zip
Diffstat (limited to '')
-rw-r--r--src/Broadcaster.cpp25
1 files changed, 19 insertions, 6 deletions
diff --git a/src/Broadcaster.cpp b/src/Broadcaster.cpp
index 98759a58b..c8d2de615 100644
--- a/src/Broadcaster.cpp
+++ b/src/Broadcaster.cpp
@@ -171,6 +171,19 @@ void cWorld::BroadcastBlockEntity(Vector3i a_BlockPos, const cClientHandle * a_E
+void cWorld::BroadcastBossBarUpdateHealth(const cEntity & a_Entity, UInt32 a_UniqueID, float a_FractionFilled)
+{
+ ForClientsWithEntity(a_Entity, *this, nullptr, [&](cClientHandle & a_Client)
+ {
+ a_Client.SendBossBarUpdateHealth(a_UniqueID, a_FractionFilled);
+ }
+ );
+}
+
+
+
+
+
void cWorld::BroadcastChat(const AString & a_Message, const cClientHandle * a_Exclude, eMessageType a_ChatPrefix)
{
ForClientsInWorld(*this, a_Exclude, [&](cClientHandle & a_Client)
@@ -444,11 +457,11 @@ void cWorld::BroadcastPlayerListRemovePlayer(const cPlayer & a_Player, const cCl
-void cWorld::BroadcastPlayerListUpdateGameMode(const cPlayer & a_Player, const cClientHandle * a_Exclude)
+void cWorld::BroadcastPlayerListUpdateDisplayName(const cPlayer & a_Player, const AString & a_CustomName, const cClientHandle * a_Exclude)
{
ForClientsInWorld(*this, a_Exclude, [&](cClientHandle & a_Client)
{
- a_Client.SendPlayerListUpdateGameMode(a_Player);
+ a_Client.SendPlayerListUpdateDisplayName(a_Player, a_CustomName);
}
);
}
@@ -457,11 +470,11 @@ void cWorld::BroadcastPlayerListUpdateGameMode(const cPlayer & a_Player, const c
-void cWorld::BroadcastPlayerListUpdatePing(const cPlayer & a_Player, const cClientHandle * a_Exclude)
+void cWorld::BroadcastPlayerListUpdateGameMode(const cPlayer & a_Player, const cClientHandle * a_Exclude)
{
ForClientsInWorld(*this, a_Exclude, [&](cClientHandle & a_Client)
{
- a_Client.SendPlayerListUpdatePing(a_Player);
+ a_Client.SendPlayerListUpdateGameMode(a_Player);
}
);
}
@@ -470,11 +483,11 @@ void cWorld::BroadcastPlayerListUpdatePing(const cPlayer & a_Player, const cClie
-void cWorld::BroadcastPlayerListUpdateDisplayName(const cPlayer & a_Player, const AString & a_CustomName, const cClientHandle * a_Exclude)
+void cWorld::BroadcastPlayerListUpdatePing(const cPlayer & a_Player, const cClientHandle * a_Exclude)
{
ForClientsInWorld(*this, a_Exclude, [&](cClientHandle & a_Client)
{
- a_Client.SendPlayerListUpdateDisplayName(a_Player, a_CustomName);
+ a_Client.SendPlayerListUpdatePing(a_Player);
}
);
}