diff options
author | andrew <xdotftw@gmail.com> | 2014-01-21 18:43:13 +0100 |
---|---|---|
committer | andrew <xdotftw@gmail.com> | 2014-01-21 18:43:13 +0100 |
commit | fa4750f015f1fed0937ba9fe80fc183c27d9e929 (patch) | |
tree | eddd2dbe01ff851750359164074d8aaa8306929e /src/Scoreboard.h | |
parent | Scoreboard protocol support (diff) | |
download | cuberite-fa4750f015f1fed0937ba9fe80fc183c27d9e929.tar cuberite-fa4750f015f1fed0937ba9fe80fc183c27d9e929.tar.gz cuberite-fa4750f015f1fed0937ba9fe80fc183c27d9e929.tar.bz2 cuberite-fa4750f015f1fed0937ba9fe80fc183c27d9e929.tar.lz cuberite-fa4750f015f1fed0937ba9fe80fc183c27d9e929.tar.xz cuberite-fa4750f015f1fed0937ba9fe80fc183c27d9e929.tar.zst cuberite-fa4750f015f1fed0937ba9fe80fc183c27d9e929.zip |
Diffstat (limited to '')
-rw-r--r-- | src/Scoreboard.h | 17 |
1 files changed, 17 insertions, 0 deletions
diff --git a/src/Scoreboard.h b/src/Scoreboard.h index b92642a9a..11b456739 100644 --- a/src/Scoreboard.h +++ b/src/Scoreboard.h @@ -22,10 +22,13 @@ typedef cItemCallback<cObjective> cObjectiveCallback; +// tolua_begin class cObjective { public: + // tolua_end + typedef int Score; enum eType @@ -82,6 +85,9 @@ public: void SetDisplayName(const AString & a_Name); + /// Send this objective to the specified client + void SendTo(cClientHandle & a_Client); + private: typedef std::pair<AString, Score> cTrackedPlayer; @@ -105,10 +111,13 @@ private: +// tolua_begin class cTeam { public: + // tolua_end + cTeam( const AString & a_Name, const AString & a_DisplayName, const AString & a_Prefix, const AString & a_Suffix @@ -169,10 +178,13 @@ private: +// tolua_begin class cScoreboard { public: + // tolua_end + enum eDisplaySlot { E_DISPLAY_SLOT_LIST = 0, @@ -209,11 +221,16 @@ public: void SetDisplay(const AString & a_Objective, eDisplaySlot a_Slot); + void SetDisplay(cObjective * a_Objective, eDisplaySlot a_Slot); + cObjective * GetObjectiveIn(eDisplaySlot a_Slot); /// Execute callback for each objective with the specified type void ForEachObjectiveWith(cObjective::eType a_Type, cObjectiveCallback& a_Callback); + /// Send this scoreboard to the specified client + void SendTo(cClientHandle & a_Client); + unsigned int GetNumObjectives(void) const; unsigned int GetNumTeams(void) const; |