diff options
author | Howaner <franzi.moos@googlemail.com> | 2014-09-28 15:16:11 +0200 |
---|---|---|
committer | Howaner <franzi.moos@googlemail.com> | 2014-09-28 15:16:11 +0200 |
commit | 63c53a8e23776cc3011fd0260857bd22274e2c62 (patch) | |
tree | 014d4498cffa77ce5bf504abe96e7d23832c9d5b /src/Bindings | |
parent | Updated api documentation. (diff) | |
download | cuberite-63c53a8e23776cc3011fd0260857bd22274e2c62.tar cuberite-63c53a8e23776cc3011fd0260857bd22274e2c62.tar.gz cuberite-63c53a8e23776cc3011fd0260857bd22274e2c62.tar.bz2 cuberite-63c53a8e23776cc3011fd0260857bd22274e2c62.tar.lz cuberite-63c53a8e23776cc3011fd0260857bd22274e2c62.tar.xz cuberite-63c53a8e23776cc3011fd0260857bd22274e2c62.tar.zst cuberite-63c53a8e23776cc3011fd0260857bd22274e2c62.zip |
Diffstat (limited to 'src/Bindings')
-rw-r--r-- | src/Bindings/ManualBindings_RankManager.cpp | 22 |
1 files changed, 22 insertions, 0 deletions
diff --git a/src/Bindings/ManualBindings_RankManager.cpp b/src/Bindings/ManualBindings_RankManager.cpp index b43cd9ef2..cddf1ec2e 100644 --- a/src/Bindings/ManualBindings_RankManager.cpp +++ b/src/Bindings/ManualBindings_RankManager.cpp @@ -129,6 +129,27 @@ static int tolua_cRankManager_AddRank(lua_State * L) +/** Binds cRankManager::ClearPlayerRanks */ +static int tolua_cRankManager_ClearPlayerRanks(lua_State * L) +{ + cLuaState S(L); + if ( + !S.CheckParamUserTable(1, "cRankManager") || + !S.CheckParamEnd(2) + ) + { + return 0; + } + + // Remove all players: + cRoot::Get()->GetRankManager().ClearPlayerRanks(); + return 1; +} + + + + + /** Binds cRankManager::GetAllGroups */ static int tolua_cRankManager_GetAllGroups(lua_State * L) { @@ -1031,6 +1052,7 @@ void ManualBindings::BindRankManager(lua_State * tolua_S) tolua_function(tolua_S, "AddGroupToRank", tolua_cRankManager_AddGroupToRank); tolua_function(tolua_S, "AddPermissionToGroup", tolua_cRankManager_AddPermissionToGroup); tolua_function(tolua_S, "AddRank", tolua_cRankManager_AddRank); + tolua_function(tolua_S, "ClearPlayerRanks", tolua_cRankManager_ClearPlayerRanks); tolua_function(tolua_S, "GetAllGroups", tolua_cRankManager_GetAllGroups); tolua_function(tolua_S, "GetAllPermissions", tolua_cRankManager_GetAllPermissions); tolua_function(tolua_S, "GetAllPlayers", tolua_cRankManager_GetAllPlayers); |