summaryrefslogtreecommitdiffstats
path: root/src/WorldStorage
diff options
context:
space:
mode:
authorandrew <xdotftw@gmail.com>2014-03-01 13:20:29 +0100
committerandrew <xdotftw@gmail.com>2014-03-01 13:20:29 +0100
commit692a84af31889af7a83b780009b1fcc81bfa3d99 (patch)
treeaafc6ace2e30ff55b082cbcef306c23d8b0a4b68 /src/WorldStorage
parentExported cScoreboard::ForEachObjective (diff)
downloadcuberite-692a84af31889af7a83b780009b1fcc81bfa3d99.tar
cuberite-692a84af31889af7a83b780009b1fcc81bfa3d99.tar.gz
cuberite-692a84af31889af7a83b780009b1fcc81bfa3d99.tar.bz2
cuberite-692a84af31889af7a83b780009b1fcc81bfa3d99.tar.lz
cuberite-692a84af31889af7a83b780009b1fcc81bfa3d99.tar.xz
cuberite-692a84af31889af7a83b780009b1fcc81bfa3d99.tar.zst
cuberite-692a84af31889af7a83b780009b1fcc81bfa3d99.zip
Diffstat (limited to 'src/WorldStorage')
-rw-r--r--src/WorldStorage/ScoreboardSerializer.cpp14
1 files changed, 7 insertions, 7 deletions
diff --git a/src/WorldStorage/ScoreboardSerializer.cpp b/src/WorldStorage/ScoreboardSerializer.cpp
index 9b8b661c4..6c885bb45 100644
--- a/src/WorldStorage/ScoreboardSerializer.cpp
+++ b/src/WorldStorage/ScoreboardSerializer.cpp
@@ -173,13 +173,13 @@ void cScoreboardSerializer::SaveScoreboardToNBT(cFastNBTWriter & a_Writer)
a_Writer.BeginCompound("DisplaySlots");
- cObjective * Objective = m_ScoreBoard->GetObjectiveIn(cScoreboard::E_DISPLAY_SLOT_LIST);
+ cObjective * Objective = m_ScoreBoard->GetObjectiveIn(cScoreboard::dsList);
a_Writer.AddString("slot_0", (Objective == NULL) ? "" : Objective->GetName());
- Objective = m_ScoreBoard->GetObjectiveIn(cScoreboard::E_DISPLAY_SLOT_SIDEBAR);
+ Objective = m_ScoreBoard->GetObjectiveIn(cScoreboard::dsSidebar);
a_Writer.AddString("slot_1", (Objective == NULL) ? "" : Objective->GetName());
- Objective = m_ScoreBoard->GetObjectiveIn(cScoreboard::E_DISPLAY_SLOT_NAME);
+ Objective = m_ScoreBoard->GetObjectiveIn(cScoreboard::dsName);
a_Writer.AddString("slot_2", (Objective == NULL) ? "" : Objective->GetName());
a_Writer.EndCompound(); // DisplaySlots
@@ -280,7 +280,7 @@ bool cScoreboardSerializer::LoadScoreboardFromNBT(const cParsedNBT & a_NBT)
{
AString Name, DisplayName, Prefix, Suffix;
- bool AllowsFriendlyFire = false, CanSeeFriendlyInvisible = false;
+ bool AllowsFriendlyFire = true, CanSeeFriendlyInvisible = false;
int CurrLine = a_NBT.FindChildByName(Child, "Name");
if (CurrLine >= 0)
@@ -346,7 +346,7 @@ bool cScoreboardSerializer::LoadScoreboardFromNBT(const cParsedNBT & a_NBT)
{
AString Name = a_NBT.GetString(CurrLine);
- m_ScoreBoard->SetDisplay(Name, cScoreboard::E_DISPLAY_SLOT_LIST);
+ m_ScoreBoard->SetDisplay(Name, cScoreboard::dsList);
}
CurrLine = a_NBT.FindChildByName(DisplaySlots, "slot_1");
@@ -354,7 +354,7 @@ bool cScoreboardSerializer::LoadScoreboardFromNBT(const cParsedNBT & a_NBT)
{
AString Name = a_NBT.GetString(CurrLine);
- m_ScoreBoard->SetDisplay(Name, cScoreboard::E_DISPLAY_SLOT_SIDEBAR);
+ m_ScoreBoard->SetDisplay(Name, cScoreboard::dsSidebar);
}
CurrLine = a_NBT.FindChildByName(DisplaySlots, "slot_2");
@@ -362,7 +362,7 @@ bool cScoreboardSerializer::LoadScoreboardFromNBT(const cParsedNBT & a_NBT)
{
AString Name = a_NBT.GetString(CurrLine);
- m_ScoreBoard->SetDisplay(Name, cScoreboard::E_DISPLAY_SLOT_NAME);
+ m_ScoreBoard->SetDisplay(Name, cScoreboard::dsName);
}
return true;