Cuberite
A lightweight, fast and extensible game server for Minecraft
ScoreboardSerializer.h
Go to the documentation of this file.
1 
2 // ScoreboardSerializer.h
3 
4 // Declares the cScoreboardSerializer class that is used for saving scoreboards into NBT format used by Anvil
5 
6 
7 
8 
9 
10 #pragma once
11 
12 
13 
14 
15 
16 // fwd:
17 class cFastNBTWriter;
18 class cParsedNBT;
19 class cScoreboard;
20 
21 
22 
23 
25 {
26 public:
27 
28  cScoreboardSerializer(const AString & a_WorldName, cScoreboard * a_ScoreBoard);
29 
31  bool Load(void);
32 
34  bool Save(void);
35 
36 
37 private:
38 
39  void SaveScoreboardToNBT(cFastNBTWriter & a_Writer);
40 
41  bool LoadScoreboardFromNBT(const cParsedNBT & a_NBT);
42 
44 
46 
47 
48 } ;
49 
50 
51 
52 
std::string AString
Definition: StringUtils.h:11
Parses and contains the parsed data Also implements data accessor functions for tree traversal and va...
Definition: FastNBT.h:153
cScoreboardSerializer(const AString &a_WorldName, cScoreboard *a_ScoreBoard)
bool Load(void)
Try to load the scoreboard.
bool Save(void)
Try to save the scoreboard.
void SaveScoreboardToNBT(cFastNBTWriter &a_Writer)
bool LoadScoreboardFromNBT(const cParsedNBT &a_NBT)