summaryrefslogtreecommitdiffstats
path: root/src/Protocol/Protocol17x.cpp
diff options
context:
space:
mode:
authorHowaner <franzi.moos@googlemail.com>2014-08-04 12:11:38 +0200
committerHowaner <franzi.moos@googlemail.com>2014-08-04 12:11:38 +0200
commit7bd414e9edf432641c30448c3fc0ff04d91ad3ab (patch)
tree93cb320e9911343f052b722278231c8b9dd79a1a /src/Protocol/Protocol17x.cpp
parentChanged /** to /* (diff)
parentMerge pull request #1285 from mc-server/StrCaseRefactor (diff)
downloadcuberite-7bd414e9edf432641c30448c3fc0ff04d91ad3ab.tar
cuberite-7bd414e9edf432641c30448c3fc0ff04d91ad3ab.tar.gz
cuberite-7bd414e9edf432641c30448c3fc0ff04d91ad3ab.tar.bz2
cuberite-7bd414e9edf432641c30448c3fc0ff04d91ad3ab.tar.lz
cuberite-7bd414e9edf432641c30448c3fc0ff04d91ad3ab.tar.xz
cuberite-7bd414e9edf432641c30448c3fc0ff04d91ad3ab.tar.zst
cuberite-7bd414e9edf432641c30448c3fc0ff04d91ad3ab.zip
Diffstat (limited to 'src/Protocol/Protocol17x.cpp')
-rw-r--r--src/Protocol/Protocol17x.cpp11
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());