diff options
author | Mattes D <github@xoft.cz> | 2014-08-04 12:02:22 +0200 |
---|---|---|
committer | Mattes D <github@xoft.cz> | 2014-08-04 12:02:22 +0200 |
commit | f619a9953aeab59dd76fb2403f87b7295e8b6ed4 (patch) | |
tree | 20ceb7a3c720fcde96a079ea3e99ec6afa05706b | |
parent | Anvil: Wolf owner not saved if not present. (diff) | |
parent | Changed properties for-loop. (diff) | |
download | cuberite-f619a9953aeab59dd76fb2403f87b7295e8b6ed4.tar cuberite-f619a9953aeab59dd76fb2403f87b7295e8b6ed4.tar.gz cuberite-f619a9953aeab59dd76fb2403f87b7295e8b6ed4.tar.bz2 cuberite-f619a9953aeab59dd76fb2403f87b7295e8b6ed4.tar.lz cuberite-f619a9953aeab59dd76fb2403f87b7295e8b6ed4.tar.xz cuberite-f619a9953aeab59dd76fb2403f87b7295e8b6ed4.tar.zst cuberite-f619a9953aeab59dd76fb2403f87b7295e8b6ed4.zip |
Diffstat (limited to '')
-rw-r--r-- | src/Protocol/Protocol17x.cpp | 11 |
1 files changed, 5 insertions, 6 deletions
diff --git a/src/Protocol/Protocol17x.cpp b/src/Protocol/Protocol17x.cpp index f419c01a7..8f3399b2f 100644 --- a/src/Protocol/Protocol17x.cpp +++ b/src/Protocol/Protocol17x.cpp @@ -3032,15 +3032,14 @@ void cProtocol176::SendPlayerSpawn(const cPlayer & a_Player) Pkt.WriteString(cMojangAPI::MakeUUIDDashed(a_Player.GetClientHandle()->GetUUID())); Pkt.WriteString(a_Player.GetName()); - const Json::Value & Properties = m_Client->GetProperties(); - const Json::Value::const_iterator End = Properties.end(); + const Json::Value & Properties = a_Player.GetClientHandle()->GetProperties(); Pkt.WriteVarInt(Properties.size()); - for (Json::Value::iterator itr = Properties.begin(); itr != End; ++itr) + for (Json::Value::iterator itr = Properties.begin(), end = Properties.end(); 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.WriteString(((Json::Value)*itr).get("name", "").asString()); + Pkt.WriteString(((Json::Value)*itr).get("value", "").asString()); + Pkt.WriteString(((Json::Value)*itr).get("signature", "").asString()); } Pkt.WriteFPInt(a_Player.GetPosX()); |