summaryrefslogtreecommitdiffstats
path: root/src/Bindings
diff options
context:
space:
mode:
authorPlasmaPower <ljbousfield@gmail.com>2016-05-29 19:12:18 +0200
committerMattes D <github@xoft.cz>2016-05-29 19:12:18 +0200
commitb4d9732fe9281d58e6970f336054205471bec74c (patch)
treeca6ef00b088e5f0ab31f54d303a9b6acbffabdeb /src/Bindings
parentFixed remaining issue from #3199 (#3207) (diff)
downloadcuberite-b4d9732fe9281d58e6970f336054205471bec74c.tar
cuberite-b4d9732fe9281d58e6970f336054205471bec74c.tar.gz
cuberite-b4d9732fe9281d58e6970f336054205471bec74c.tar.bz2
cuberite-b4d9732fe9281d58e6970f336054205471bec74c.tar.lz
cuberite-b4d9732fe9281d58e6970f336054205471bec74c.tar.xz
cuberite-b4d9732fe9281d58e6970f336054205471bec74c.tar.zst
cuberite-b4d9732fe9281d58e6970f336054205471bec74c.zip
Diffstat (limited to 'src/Bindings')
-rw-r--r--src/Bindings/ManualBindings.cpp25
1 files changed, 25 insertions, 0 deletions
diff --git a/src/Bindings/ManualBindings.cpp b/src/Bindings/ManualBindings.cpp
index 523244ed2..91e80acbc 100644
--- a/src/Bindings/ManualBindings.cpp
+++ b/src/Bindings/ManualBindings.cpp
@@ -2756,6 +2756,30 @@ static int tolua_cRoot_GetFurnaceRecipe(lua_State * tolua_S)
+static int tolua_cScoreboard_GetTeamNames(lua_State * L)
+{
+ cLuaState S(L);
+ if (
+ !S.CheckParamUserType(1, "cScoreboard") ||
+ !S.CheckParamEnd(2)
+ )
+ {
+ return 0;
+ }
+
+ // Get the groups:
+ cScoreboard * Scoreboard = reinterpret_cast<cScoreboard *>(tolua_tousertype(L, 1, nullptr));
+ AStringVector Teams = Scoreboard->GetTeamNames();
+
+ // Push the results:
+ S.Push(Teams);
+ return 1;
+}
+
+
+
+
+
static int tolua_cHopperEntity_GetOutputBlockPos(lua_State * tolua_S)
{
// function cHopperEntity::GetOutputBlockPos()
@@ -3532,6 +3556,7 @@ void cManualBindings::Bind(lua_State * tolua_S)
tolua_beginmodule(tolua_S, "cScoreboard");
tolua_function(tolua_S, "ForEachObjective", ForEach<cScoreboard, cObjective, &cScoreboard::ForEachObjective>);
tolua_function(tolua_S, "ForEachTeam", ForEach<cScoreboard, cTeam, &cScoreboard::ForEachTeam>);
+ tolua_function(tolua_S, "GetTeamNames", tolua_cScoreboard_GetTeamNames);
tolua_endmodule(tolua_S);
tolua_beginmodule(tolua_S, "cStringCompression");