diff options
author | jan64 <jan64.email@gmail.com> | 2015-06-03 18:11:12 +0200 |
---|---|---|
committer | jan64 <jan64.email@gmail.com> | 2015-06-03 18:11:12 +0200 |
commit | fd964200b23eda1276b0dbdd6bd497f1ca8cc789 (patch) | |
tree | f5e00cdfb1c428a113266f942a965754f5961219 /src/Protocol | |
parent | Added system and above action bar chat messages (diff) | |
download | cuberite-fd964200b23eda1276b0dbdd6bd497f1ca8cc789.tar cuberite-fd964200b23eda1276b0dbdd6bd497f1ca8cc789.tar.gz cuberite-fd964200b23eda1276b0dbdd6bd497f1ca8cc789.tar.bz2 cuberite-fd964200b23eda1276b0dbdd6bd497f1ca8cc789.tar.lz cuberite-fd964200b23eda1276b0dbdd6bd497f1ca8cc789.tar.xz cuberite-fd964200b23eda1276b0dbdd6bd497f1ca8cc789.tar.zst cuberite-fd964200b23eda1276b0dbdd6bd497f1ca8cc789.zip |
Diffstat (limited to '')
-rw-r--r-- | src/Protocol/Protocol17x.cpp | 12 |
1 files changed, 11 insertions, 1 deletions
diff --git a/src/Protocol/Protocol17x.cpp b/src/Protocol/Protocol17x.cpp index 71c68c071..e043698dd 100644 --- a/src/Protocol/Protocol17x.cpp +++ b/src/Protocol/Protocol17x.cpp @@ -302,7 +302,12 @@ void cProtocol172::SendChatAboveActionBar(const cCompositeChat & a_Message) void cProtocol172::SendChatType(const AString & a_Message, eChatType type) { ASSERT(m_State == 3); // In game mode? - + + if (type != ctChatBox) // 1.7.2 doesn't support anything else + { + return; + } + cPacketizer Pkt(*this, 0x02); // Chat Message packet Pkt.WriteString(Printf("{\"text\":\"%s\"}", EscapeString(a_Message).c_str())); } @@ -315,6 +320,11 @@ void cProtocol172::SendChatType(const cCompositeChat & a_Message, eChatType type { ASSERT(m_State == 3); // In game mode? + if (type != ctChatBox) // 1.7.2 doesn't support anything else + { + return; + } + cWorld * World = m_Client->GetPlayer()->GetWorld(); bool ShouldUseChatPrefixes = (World == nullptr) ? false : World->ShouldUseChatPrefixes(); |