summaryrefslogtreecommitdiffstats
path: root/src/Entities/Player.cpp
diff options
context:
space:
mode:
authorTiger Wang <ziwei.tiger@outlook.com>2020-08-21 00:27:08 +0200
committerTiger Wang <ziwei.tiger@outlook.com>2020-08-21 01:53:10 +0200
commite23dcffaff5ce3b3da1e44fba21c03e66f48c1ce (patch)
treea53e6c1eca0d223ebc016a541e9ec1d70273faee /src/Entities/Player.cpp
parentConsolidate various Chunk serialisers under one roof (diff)
downloadcuberite-e23dcffaff5ce3b3da1e44fba21c03e66f48c1ce.tar
cuberite-e23dcffaff5ce3b3da1e44fba21c03e66f48c1ce.tar.gz
cuberite-e23dcffaff5ce3b3da1e44fba21c03e66f48c1ce.tar.bz2
cuberite-e23dcffaff5ce3b3da1e44fba21c03e66f48c1ce.tar.lz
cuberite-e23dcffaff5ce3b3da1e44fba21c03e66f48c1ce.tar.xz
cuberite-e23dcffaff5ce3b3da1e44fba21c03e66f48c1ce.tar.zst
cuberite-e23dcffaff5ce3b3da1e44fba21c03e66f48c1ce.zip
Diffstat (limited to 'src/Entities/Player.cpp')
-rw-r--r--src/Entities/Player.cpp6
1 files changed, 2 insertions, 4 deletions
diff --git a/src/Entities/Player.cpp b/src/Entities/Player.cpp
index 764bd7500..841b70b01 100644
--- a/src/Entities/Player.cpp
+++ b/src/Entities/Player.cpp
@@ -2327,8 +2327,7 @@ bool cPlayer::LoadFromFile(const AString & a_FileName, cWorldPtr & a_World)
{
// Load the player stats.
// We use the default world name (like bukkit) because stats are shared between dimensions / worlds.
- cStatSerializer StatSerializer(m_Stats, cRoot::Get()->GetDefaultWorld()->GetDataPath(), GetUUID().ToLongString());
- StatSerializer.Load();
+ StatSerializer::Load(m_Stats, cRoot::Get()->GetDefaultWorld()->GetDataPath(), GetUUID().ToLongString());
}
catch (...)
{
@@ -2476,8 +2475,7 @@ bool cPlayer::SaveToDisk()
{
// Save the player stats.
// We use the default world name (like bukkit) because stats are shared between dimensions / worlds.
- cStatSerializer StatSerializer(m_Stats, cRoot::Get()->GetDefaultWorld()->GetDataPath(), GetUUID().ToLongString());
- StatSerializer.Save();
+ StatSerializer::Save(m_Stats, cRoot::Get()->GetDefaultWorld()->GetDataPath(), GetUUID().ToLongString());
}
catch (...)
{