summaryrefslogtreecommitdiffstats
path: root/src/Scoreboard.h
diff options
context:
space:
mode:
authorandrew <xdotftw@gmail.com>2014-03-01 13:03:16 +0100
committerandrew <xdotftw@gmail.com>2014-03-01 13:03:16 +0100
commita28e5eca1835e1be868c3bcd22d87e3cfae2f547 (patch)
tree278c6e7ac3743414539944fd2df6420e1ec651ed /src/Scoreboard.h
parentExported and documented cScoreboard (diff)
downloadcuberite-a28e5eca1835e1be868c3bcd22d87e3cfae2f547.tar
cuberite-a28e5eca1835e1be868c3bcd22d87e3cfae2f547.tar.gz
cuberite-a28e5eca1835e1be868c3bcd22d87e3cfae2f547.tar.bz2
cuberite-a28e5eca1835e1be868c3bcd22d87e3cfae2f547.tar.lz
cuberite-a28e5eca1835e1be868c3bcd22d87e3cfae2f547.tar.xz
cuberite-a28e5eca1835e1be868c3bcd22d87e3cfae2f547.tar.zst
cuberite-a28e5eca1835e1be868c3bcd22d87e3cfae2f547.zip
Diffstat (limited to '')
-rw-r--r--src/Scoreboard.h19
1 files changed, 17 insertions, 2 deletions
diff --git a/src/Scoreboard.h b/src/Scoreboard.h
index f9a8665da..8e268516d 100644
--- a/src/Scoreboard.h
+++ b/src/Scoreboard.h
@@ -92,6 +92,12 @@ public:
/** Send this objective to the specified client */
void SendTo(cClientHandle & a_Client);
+ static const char * GetClassStatic(void) // Needed for ManualBindings's ForEach templates
+ {
+ return "cObjective";
+ }
+
+
private:
typedef std::pair<AString, Score> cTrackedPlayer;
@@ -246,8 +252,17 @@ public:
cTeam * QueryPlayerTeam(const AString & a_Name); // WARNING: O(n logn)
- /** Execute callback for each objective with the specified type */
- void ForEachObjectiveWith(cObjective::eType a_Type, cObjectiveCallback& a_Callback);
+ /** Execute callback for each objective with the specified type
+ *
+ * Returns true if all objectives processed, false if the callback aborted by returning true.
+ */
+ bool ForEachObjectiveWith(cObjective::eType a_Type, cObjectiveCallback& a_Callback);
+
+ /** Execute callback for each objective.
+ *
+ * Returns true if all objectives processed, false if the callback aborted by returning true.
+ */
+ bool ForEachObjective(cObjectiveCallback& a_Callback); // Exported in ManualBindings.cpp
void SetDisplay(cObjective * a_Objective, eDisplaySlot a_Slot);