summaryrefslogtreecommitdiffstats
path: root/src/Protocol
diff options
context:
space:
mode:
authorworktycho <work.tycho@gmail.com>2015-06-04 12:28:43 +0200
committerworktycho <work.tycho@gmail.com>2015-06-04 12:28:43 +0200
commitc9ad1ecd3e9931e6928f8846bdb26cf6f8a6a957 (patch)
treea74fed75c1cd63c0bc1f2c582a00c4bb2d0bbe4e /src/Protocol
parentMerge pull request #2188 from cengizIO/master (diff)
parentAdded SendSystemMessage / SendAboveActionBarMessage to the docs (diff)
downloadcuberite-c9ad1ecd3e9931e6928f8846bdb26cf6f8a6a957.tar
cuberite-c9ad1ecd3e9931e6928f8846bdb26cf6f8a6a957.tar.gz
cuberite-c9ad1ecd3e9931e6928f8846bdb26cf6f8a6a957.tar.bz2
cuberite-c9ad1ecd3e9931e6928f8846bdb26cf6f8a6a957.tar.lz
cuberite-c9ad1ecd3e9931e6928f8846bdb26cf6f8a6a957.tar.xz
cuberite-c9ad1ecd3e9931e6928f8846bdb26cf6f8a6a957.tar.zst
cuberite-c9ad1ecd3e9931e6928f8846bdb26cf6f8a6a957.zip
Diffstat (limited to 'src/Protocol')
-rw-r--r--src/Protocol/Protocol17x.cpp12
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();