Fix player skin sending through BungeeCord (#4328)
This fixes sending of player skins through BungeeCord by actually parsing the JSON instead of setting the player properties as a string.
This commit is contained in:
parent
10b60971f5
commit
8b4d37771f
@ -24,15 +24,12 @@ Implements the 1.9 protocol classes:
|
|||||||
#include "../Root.h"
|
#include "../Root.h"
|
||||||
#include "../Server.h"
|
#include "../Server.h"
|
||||||
#include "../World.h"
|
#include "../World.h"
|
||||||
#include "../EffectID.h"
|
|
||||||
#include "../StringCompression.h"
|
#include "../StringCompression.h"
|
||||||
#include "../CompositeChat.h"
|
#include "../CompositeChat.h"
|
||||||
#include "../Statistics.h"
|
#include "../Statistics.h"
|
||||||
|
|
||||||
#include "../WorldStorage/FastNBT.h"
|
#include "../WorldStorage/FastNBT.h"
|
||||||
#include "../WorldStorage/EnchantmentSerializer.h"
|
|
||||||
|
|
||||||
#include "../Entities/Boat.h"
|
|
||||||
#include "../Entities/ExpOrb.h"
|
#include "../Entities/ExpOrb.h"
|
||||||
#include "../Entities/Minecart.h"
|
#include "../Entities/Minecart.h"
|
||||||
#include "../Entities/FallingBlock.h"
|
#include "../Entities/FallingBlock.h"
|
||||||
@ -47,7 +44,6 @@ Implements the 1.9 protocol classes:
|
|||||||
#include "../Items/ItemSpawnEgg.h"
|
#include "../Items/ItemSpawnEgg.h"
|
||||||
|
|
||||||
#include "../Mobs/IncludeAllMonsters.h"
|
#include "../Mobs/IncludeAllMonsters.h"
|
||||||
#include "../UI/Window.h"
|
|
||||||
#include "../UI/HorseWindow.h"
|
#include "../UI/HorseWindow.h"
|
||||||
|
|
||||||
#include "../BlockEntities/BeaconEntity.h"
|
#include "../BlockEntities/BeaconEntity.h"
|
||||||
@ -154,7 +150,16 @@ cProtocol_1_9_0::cProtocol_1_9_0(cClientHandle * a_Client, const AString & a_Ser
|
|||||||
UUID.FromString(Params[2]);
|
UUID.FromString(Params[2]);
|
||||||
m_Client->SetUUID(UUID);
|
m_Client->SetUUID(UUID);
|
||||||
|
|
||||||
m_Client->SetProperties(Params[3]);
|
Json::Value root;
|
||||||
|
Json::Reader reader;
|
||||||
|
if (!reader.parse(Params[3], root))
|
||||||
|
{
|
||||||
|
LOGERROR("Unable to parse player properties: '%s'", Params[3]);
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
m_Client->SetProperties(root);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
|
Loading…
Reference in New Issue
Block a user