From 5176c22656a8fb5485ab04100daa93bb761bb8f6 Mon Sep 17 00:00:00 2001 From: 12xx12 <44411062+12xx12@users.noreply.github.com> Date: Wed, 5 Aug 2020 20:55:19 +0200 Subject: [PATCH] imprementing plugin message to send server brand (#4786) * fixed issue #4773 Co-authored-by: 12xx12 <12xx12100@gmail.com> --- src/Protocol/Protocol_1_13.cpp | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/src/Protocol/Protocol_1_13.cpp b/src/Protocol/Protocol_1_13.cpp index 3ca1cc3a8..94dc39ea9 100644 --- a/src/Protocol/Protocol_1_13.cpp +++ b/src/Protocol/Protocol_1_13.cpp @@ -133,7 +133,11 @@ void cProtocol_1_13::SendParticleEffect(const AString & a_ParticleName, Vector3f void cProtocol_1_13::SendPluginMessage(const AString & a_Channel, const AString & a_Message) { - // TODO + ASSERT(m_State == 3); // In game mode? + + cPacketizer Pkt(*this, pktPluginMessage); + Pkt.WriteString(a_Channel); + Pkt.WriteString(a_Message); } @@ -240,7 +244,7 @@ void cProtocol_1_13::HandlePacketPluginMessage(cByteBuffer & a_ByteBuffer) m_Client->SetClientBrand(Brand); // Send back our brand, including the length: - SendPluginMessage("minecraft:brand", "\x08""Cuberite"); + SendPluginMessage("minecraft:brand", "Cuberite"); return; }