diff options
author | Howaner <franzi.moos@googlemail.com> | 2014-09-02 19:12:35 +0200 |
---|---|---|
committer | Howaner <franzi.moos@googlemail.com> | 2014-09-02 19:12:35 +0200 |
commit | 1bb4d7941267ee55cdf7f35fa6a0055521115960 (patch) | |
tree | 38b2faa2d824bca6da9ec88c2c0c0d9bbe81f6df /src/Protocol/Protocol132.cpp | |
parent | Added name tag (diff) | |
download | cuberite-1bb4d7941267ee55cdf7f35fa6a0055521115960.tar cuberite-1bb4d7941267ee55cdf7f35fa6a0055521115960.tar.gz cuberite-1bb4d7941267ee55cdf7f35fa6a0055521115960.tar.bz2 cuberite-1bb4d7941267ee55cdf7f35fa6a0055521115960.tar.lz cuberite-1bb4d7941267ee55cdf7f35fa6a0055521115960.tar.xz cuberite-1bb4d7941267ee55cdf7f35fa6a0055521115960.tar.zst cuberite-1bb4d7941267ee55cdf7f35fa6a0055521115960.zip |
Diffstat (limited to 'src/Protocol/Protocol132.cpp')
-rw-r--r-- | src/Protocol/Protocol132.cpp | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/src/Protocol/Protocol132.cpp b/src/Protocol/Protocol132.cpp index 5c58ab0ba..af3bc68ee 100644 --- a/src/Protocol/Protocol132.cpp +++ b/src/Protocol/Protocol132.cpp @@ -260,7 +260,14 @@ void cProtocol132::SendPlayerSpawn(const cPlayer & a_Player) cCSLock Lock(m_CSPacket); WriteByte (PACKET_PLAYER_SPAWN); WriteInt (a_Player.GetUniqueID()); - WriteString(a_Player.GetName()); + if (a_Player.HasCustomName()) + { + WriteString(a_Player.GetCustomName()); + } + else + { + WriteString(a_Player.GetName()); + } WriteInt ((int)(a_Player.GetPosX() * 32)); WriteInt ((int)(a_Player.GetPosY() * 32)); WriteInt ((int)(a_Player.GetPosZ() * 32)); |