summaryrefslogtreecommitdiffstats
path: root/src/Protocol/Protocol17x.cpp
diff options
context:
space:
mode:
authorTiger Wang <ziwei.tiger@hotmail.co.uk>2014-07-14 20:49:31 +0200
committerTiger Wang <ziwei.tiger@hotmail.co.uk>2014-07-14 20:49:31 +0200
commit4e24f711abd3d6a93f01ee7c297eb67c8aedbd37 (patch)
tree8b9c4ada0a310717932fcbeda10e0d4f8cc5d8bc /src/Protocol/Protocol17x.cpp
parentOnly one instance of server can be started (diff)
downloadcuberite-4e24f711abd3d6a93f01ee7c297eb67c8aedbd37.tar
cuberite-4e24f711abd3d6a93f01ee7c297eb67c8aedbd37.tar.gz
cuberite-4e24f711abd3d6a93f01ee7c297eb67c8aedbd37.tar.bz2
cuberite-4e24f711abd3d6a93f01ee7c297eb67c8aedbd37.tar.lz
cuberite-4e24f711abd3d6a93f01ee7c297eb67c8aedbd37.tar.xz
cuberite-4e24f711abd3d6a93f01ee7c297eb67c8aedbd37.tar.zst
cuberite-4e24f711abd3d6a93f01ee7c297eb67c8aedbd37.zip
Diffstat (limited to 'src/Protocol/Protocol17x.cpp')
-rw-r--r--src/Protocol/Protocol17x.cpp14
1 files changed, 13 insertions, 1 deletions
diff --git a/src/Protocol/Protocol17x.cpp b/src/Protocol/Protocol17x.cpp
index 855687269..ae800e9cf 100644
--- a/src/Protocol/Protocol17x.cpp
+++ b/src/Protocol/Protocol17x.cpp
@@ -3015,7 +3015,19 @@ void cProtocol176::SendPlayerSpawn(const cPlayer & a_Player)
Pkt.WriteVarInt(a_Player.GetUniqueID());
Pkt.WriteString(a_Player.GetClientHandle()->GetUUID());
Pkt.WriteString(a_Player.GetName());
- Pkt.WriteVarInt(0); // We have no data to send here
+
+ Json::Value root;
+ Json::Reader reader;
+ reader.parse(m_Client->GetProperties(), root);
+
+ Pkt.WriteVarInt(root.size());
+ for (Json::Value::iterator itr = root.begin(); itr != root.end(); ++itr)
+ {
+ Pkt.WriteString(((Json::Value)*itr).get("name", "").toStyledString());
+ Pkt.WriteString(((Json::Value)*itr).get("value", "").toStyledString());
+ Pkt.WriteString(((Json::Value)*itr).get("signature", "").toStyledString());
+ }
+
Pkt.WriteFPInt(a_Player.GetPosX());
Pkt.WriteFPInt(a_Player.GetPosY());
Pkt.WriteFPInt(a_Player.GetPosZ());