summaryrefslogtreecommitdiffstats
path: root/src/Protocol
diff options
context:
space:
mode:
authorDaPorkchop_ <DaMatrix@users.noreply.github.com>2019-04-22 19:54:22 +0200
committerpeterbell10 <peterbell10@live.co.uk>2019-04-22 19:54:22 +0200
commit8b4d37771f6948f57f9e2d6359c574c2b411cc05 (patch)
tree526e34314e076f4bd0b652c66b2b798d4c70608d /src/Protocol
parentMake Nether portals spawn the player inside of them (#4325) (diff)
downloadcuberite-8b4d37771f6948f57f9e2d6359c574c2b411cc05.tar
cuberite-8b4d37771f6948f57f9e2d6359c574c2b411cc05.tar.gz
cuberite-8b4d37771f6948f57f9e2d6359c574c2b411cc05.tar.bz2
cuberite-8b4d37771f6948f57f9e2d6359c574c2b411cc05.tar.lz
cuberite-8b4d37771f6948f57f9e2d6359c574c2b411cc05.tar.xz
cuberite-8b4d37771f6948f57f9e2d6359c574c2b411cc05.tar.zst
cuberite-8b4d37771f6948f57f9e2d6359c574c2b411cc05.zip
Diffstat (limited to '')
-rw-r--r--src/Protocol/Protocol_1_9.cpp15
1 files changed, 10 insertions, 5 deletions
diff --git a/src/Protocol/Protocol_1_9.cpp b/src/Protocol/Protocol_1_9.cpp
index d929b4a14..00b233af5 100644
--- a/src/Protocol/Protocol_1_9.cpp
+++ b/src/Protocol/Protocol_1_9.cpp
@@ -24,15 +24,12 @@ Implements the 1.9 protocol classes:
#include "../Root.h"
#include "../Server.h"
#include "../World.h"
-#include "../EffectID.h"
#include "../StringCompression.h"
#include "../CompositeChat.h"
#include "../Statistics.h"
#include "../WorldStorage/FastNBT.h"
-#include "../WorldStorage/EnchantmentSerializer.h"
-#include "../Entities/Boat.h"
#include "../Entities/ExpOrb.h"
#include "../Entities/Minecart.h"
#include "../Entities/FallingBlock.h"
@@ -47,7 +44,6 @@ Implements the 1.9 protocol classes:
#include "../Items/ItemSpawnEgg.h"
#include "../Mobs/IncludeAllMonsters.h"
-#include "../UI/Window.h"
#include "../UI/HorseWindow.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]);
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
{