summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorMattes D <github@xoft.cz>2014-09-06 13:11:08 +0200
committerMattes D <github@xoft.cz>2014-09-06 13:11:08 +0200
commitdd0aa22d2e5720aac5df473382c3ddaa1ca7e484 (patch)
tree808f2cc3d3bab956e1354e2000dffa70ddd01d46 /src
parentRemoved outdated message sending methods. (diff)
downloadcuberite-dd0aa22d2e5720aac5df473382c3ddaa1ca7e484.tar
cuberite-dd0aa22d2e5720aac5df473382c3ddaa1ca7e484.tar.gz
cuberite-dd0aa22d2e5720aac5df473382c3ddaa1ca7e484.tar.bz2
cuberite-dd0aa22d2e5720aac5df473382c3ddaa1ca7e484.tar.lz
cuberite-dd0aa22d2e5720aac5df473382c3ddaa1ca7e484.tar.xz
cuberite-dd0aa22d2e5720aac5df473382c3ddaa1ca7e484.tar.zst
cuberite-dd0aa22d2e5720aac5df473382c3ddaa1ca7e484.zip
Diffstat (limited to 'src')
-rw-r--r--src/WorldStorage/ScoreboardSerializer.cpp20
1 files changed, 10 insertions, 10 deletions
diff --git a/src/WorldStorage/ScoreboardSerializer.cpp b/src/WorldStorage/ScoreboardSerializer.cpp
index da8236e0d..e30eecf67 100644
--- a/src/WorldStorage/ScoreboardSerializer.cpp
+++ b/src/WorldStorage/ScoreboardSerializer.cpp
@@ -283,37 +283,37 @@ bool cScoreboardSerializer::LoadScoreboardFromNBT(const cParsedNBT & a_NBT)
bool AllowsFriendlyFire = true, CanSeeFriendlyInvisible = false;
int CurrLine = a_NBT.FindChildByName(Child, "Name");
- if (CurrLine >= 0)
+ if ((CurrLine >= 0) && (a_NBT.GetType(CurrLine) == TAG_String))
{
- Name = a_NBT.GetInt(CurrLine);
+ Name = a_NBT.GetString(CurrLine);
}
CurrLine = a_NBT.FindChildByName(Child, "DisplayName");
- if (CurrLine >= 0)
+ if ((CurrLine >= 0) && (a_NBT.GetType(CurrLine) == TAG_String))
{
- DisplayName = a_NBT.GetInt(CurrLine);
+ DisplayName = a_NBT.GetString(CurrLine);
}
CurrLine = a_NBT.FindChildByName(Child, "Prefix");
- if (CurrLine >= 0)
+ if ((CurrLine >= 0) && (a_NBT.GetType(CurrLine) == TAG_String))
{
- Prefix = a_NBT.GetInt(CurrLine);
+ Prefix = a_NBT.GetString(CurrLine);
}
CurrLine = a_NBT.FindChildByName(Child, "Suffix");
- if (CurrLine >= 0)
+ if ((CurrLine >= 0) && (a_NBT.GetType(CurrLine) == TAG_String))
{
- Suffix = a_NBT.GetInt(CurrLine);
+ Suffix = a_NBT.GetString(CurrLine);
}
CurrLine = a_NBT.FindChildByName(Child, "AllowFriendlyFire");
- if (CurrLine >= 0)
+ if ((CurrLine >= 0) && (a_NBT.GetType(CurrLine) == TAG_Int))
{
AllowsFriendlyFire = (a_NBT.GetInt(CurrLine) != 0);
}
CurrLine = a_NBT.FindChildByName(Child, "SeeFriendlyInvisibles");
- if (CurrLine >= 0)
+ if ((CurrLine >= 0) && (a_NBT.GetType(CurrLine) == TAG_Int))
{
CanSeeFriendlyInvisible = (a_NBT.GetInt(CurrLine) != 0);
}