summaryrefslogtreecommitdiffstats
path: root/src/Protocol/Protocol19x.cpp
diff options
context:
space:
mode:
authorLukas Pioch <lukas@zgow.de>2016-10-23 22:52:10 +0200
committerGitHub <noreply@github.com>2016-10-23 22:52:10 +0200
commit824f5dbbd6b88226b6899b7566fecb3af2cc6d58 (patch)
treee73bb368cc26cf3c6b5041bc27ae818ec50a25f9 /src/Protocol/Protocol19x.cpp
parentStyleCheck: Add "else has to be on a separate line" (#3412) (diff)
parentAdded SendMessageRaw for sending json string. (diff)
downloadcuberite-824f5dbbd6b88226b6899b7566fecb3af2cc6d58.tar
cuberite-824f5dbbd6b88226b6899b7566fecb3af2cc6d58.tar.gz
cuberite-824f5dbbd6b88226b6899b7566fecb3af2cc6d58.tar.bz2
cuberite-824f5dbbd6b88226b6899b7566fecb3af2cc6d58.tar.lz
cuberite-824f5dbbd6b88226b6899b7566fecb3af2cc6d58.tar.xz
cuberite-824f5dbbd6b88226b6899b7566fecb3af2cc6d58.tar.zst
cuberite-824f5dbbd6b88226b6899b7566fecb3af2cc6d58.zip
Diffstat (limited to 'src/Protocol/Protocol19x.cpp')
-rw-r--r--src/Protocol/Protocol19x.cpp14
1 files changed, 14 insertions, 0 deletions
diff --git a/src/Protocol/Protocol19x.cpp b/src/Protocol/Protocol19x.cpp
index 6e26b2012..5f3b9ec27 100644
--- a/src/Protocol/Protocol19x.cpp
+++ b/src/Protocol/Protocol19x.cpp
@@ -293,6 +293,20 @@ void cProtocol190::SendChat(const cCompositeChat & a_Message, eChatType a_Type,
+void cProtocol190::SendChatRaw(const AString & a_MessageRaw, eChatType a_Type)
+{
+ ASSERT(m_State == 3); // In game mode?
+
+ // Send the json string to the client:
+ cPacketizer Pkt(*this, 0x0f); // Chat Message packet
+ Pkt.WriteString(a_MessageRaw);
+ Pkt.WriteBEInt8(a_Type);
+}
+
+
+
+
+
void cProtocol190::SendChunkData(int a_ChunkX, int a_ChunkZ, cChunkDataSerializer & a_Serializer)
{
ASSERT(m_State == 3); // In game mode?