summaryrefslogtreecommitdiffstats
path: root/src/ClientHandle.cpp
diff options
context:
space:
mode:
authorjan64 <jan64.email@gmail.com>2015-06-02 19:59:46 +0200
committerjan64 <jan64.email@gmail.com>2015-06-02 19:59:46 +0200
commitd37e0eb72b12cd47863bdca78a790a3f6193d863 (patch)
tree4036b4b29e577b4886ab2d77d7f2b9bc601b7091 /src/ClientHandle.cpp
parentMerge pull request #2182 from birkett/master (diff)
downloadcuberite-d37e0eb72b12cd47863bdca78a790a3f6193d863.tar
cuberite-d37e0eb72b12cd47863bdca78a790a3f6193d863.tar.gz
cuberite-d37e0eb72b12cd47863bdca78a790a3f6193d863.tar.bz2
cuberite-d37e0eb72b12cd47863bdca78a790a3f6193d863.tar.lz
cuberite-d37e0eb72b12cd47863bdca78a790a3f6193d863.tar.xz
cuberite-d37e0eb72b12cd47863bdca78a790a3f6193d863.tar.zst
cuberite-d37e0eb72b12cd47863bdca78a790a3f6193d863.zip
Diffstat (limited to 'src/ClientHandle.cpp')
-rw-r--r--src/ClientHandle.cpp58
1 files changed, 58 insertions, 0 deletions
diff --git a/src/ClientHandle.cpp b/src/ClientHandle.cpp
index e3f63b091..d89f7ab77 100644
--- a/src/ClientHandle.cpp
+++ b/src/ClientHandle.cpp
@@ -2113,6 +2113,64 @@ void cClientHandle::SendChat(const cCompositeChat & a_Message)
+void cClientHandle::SendChatAboveActionBar(const AString & a_Message, eMessageType a_ChatPrefix, const AString & a_AdditionalData)
+{
+ cWorld * World = GetPlayer()->GetWorld();
+ if (World == nullptr)
+ {
+ World = cRoot::Get()->GetWorld(GetPlayer()->GetLoadedWorldName());
+ if (World == nullptr)
+ {
+ World = cRoot::Get()->GetDefaultWorld();
+ }
+ }
+
+ AString Message = FormatMessageType(World->ShouldUseChatPrefixes(), a_ChatPrefix, a_AdditionalData);
+ m_Protocol->SendChatAboveActionBar(Message.append(a_Message));
+}
+
+
+
+
+
+void cClientHandle::SendChatAboveActionBar(const cCompositeChat & a_Message)
+{
+ m_Protocol->SendChatAboveActionBar(a_Message);
+}
+
+
+
+
+
+void cClientHandle::SendChatSystem(const AString & a_Message, eMessageType a_ChatPrefix, const AString & a_AdditionalData)
+{
+ cWorld * World = GetPlayer()->GetWorld();
+ if (World == nullptr)
+ {
+ World = cRoot::Get()->GetWorld(GetPlayer()->GetLoadedWorldName());
+ if (World == nullptr)
+ {
+ World = cRoot::Get()->GetDefaultWorld();
+ }
+ }
+
+ AString Message = FormatMessageType(World->ShouldUseChatPrefixes(), a_ChatPrefix, a_AdditionalData);
+ m_Protocol->SendChatSystem(Message.append(a_Message));
+}
+
+
+
+
+
+void cClientHandle::SendChatSystem(const cCompositeChat & a_Message)
+{
+ m_Protocol->SendChatSystem(a_Message);
+}
+
+
+
+
+
void cClientHandle::SendChunkData(int a_ChunkX, int a_ChunkZ, cChunkDataSerializer & a_Serializer)
{
ASSERT(m_Player != nullptr);