summaryrefslogtreecommitdiffstats
path: root/src/Protocol/Protocol17x.cpp
diff options
context:
space:
mode:
authorMattes D <github@xoft.cz>2014-07-16 13:30:57 +0200
committerMattes D <github@xoft.cz>2014-07-16 13:30:57 +0200
commite444106d0924b1faecc61e50ca27a1d9c7fd7c9f (patch)
tree3d3aa66b0bf8ed4063fbda9ce2ddef62d9185fab /src/Protocol/Protocol17x.cpp
parentFixed a DropSpenser AddFace bug (diff)
parentSuggestions (diff)
downloadcuberite-e444106d0924b1faecc61e50ca27a1d9c7fd7c9f.tar
cuberite-e444106d0924b1faecc61e50ca27a1d9c7fd7c9f.tar.gz
cuberite-e444106d0924b1faecc61e50ca27a1d9c7fd7c9f.tar.bz2
cuberite-e444106d0924b1faecc61e50ca27a1d9c7fd7c9f.tar.lz
cuberite-e444106d0924b1faecc61e50ca27a1d9c7fd7c9f.tar.xz
cuberite-e444106d0924b1faecc61e50ca27a1d9c7fd7c9f.tar.zst
cuberite-e444106d0924b1faecc61e50ca27a1d9c7fd7c9f.zip
Diffstat (limited to 'src/Protocol/Protocol17x.cpp')
-rw-r--r--src/Protocol/Protocol17x.cpp13
1 files changed, 12 insertions, 1 deletions
diff --git a/src/Protocol/Protocol17x.cpp b/src/Protocol/Protocol17x.cpp
index dc6a817a3..50c2014c6 100644
--- a/src/Protocol/Protocol17x.cpp
+++ b/src/Protocol/Protocol17x.cpp
@@ -3015,7 +3015,18 @@ 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
+
+ const Json::Value & Properties = m_Client->GetProperties();
+ const Json::Value::const_iterator End = Properties.end();
+ Pkt.WriteVarInt(Properties.size());
+
+ for (Json::Value::iterator itr = Properties.begin(); itr != 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());