summaryrefslogtreecommitdiffstats
path: root/src/Bindings/ManualBindings.cpp
diff options
context:
space:
mode:
authormadmaxoft <github@xoft.cz>2014-02-09 20:39:45 +0100
committermadmaxoft <github@xoft.cz>2014-02-09 20:39:45 +0100
commit47a497fa895fa5f353ba593d4bb232ea514e66c9 (patch)
tree59be3c7320d5c4f8b8d25aa2a28769e66de8921b /src/Bindings/ManualBindings.cpp
parentDebuggers: Disabled testing plugin calls. (diff)
downloadcuberite-47a497fa895fa5f353ba593d4bb232ea514e66c9.tar
cuberite-47a497fa895fa5f353ba593d4bb232ea514e66c9.tar.gz
cuberite-47a497fa895fa5f353ba593d4bb232ea514e66c9.tar.bz2
cuberite-47a497fa895fa5f353ba593d4bb232ea514e66c9.tar.lz
cuberite-47a497fa895fa5f353ba593d4bb232ea514e66c9.tar.xz
cuberite-47a497fa895fa5f353ba593d4bb232ea514e66c9.tar.zst
cuberite-47a497fa895fa5f353ba593d4bb232ea514e66c9.zip
Diffstat (limited to '')
-rw-r--r--src/Bindings/ManualBindings.cpp41
1 files changed, 41 insertions, 0 deletions
diff --git a/src/Bindings/ManualBindings.cpp b/src/Bindings/ManualBindings.cpp
index 841ec5cf2..3571fd7ea 100644
--- a/src/Bindings/ManualBindings.cpp
+++ b/src/Bindings/ManualBindings.cpp
@@ -8,6 +8,7 @@
#include "PluginLua.h"
#include "PluginManager.h"
#include "LuaWindow.h"
+#include "LuaChunkStay.h"
#include "../Root.h"
#include "../World.h"
#include "../Entities/Player.h"
@@ -1638,6 +1639,42 @@ static int tolua_cPluginManager_CallPlugin(lua_State * tolua_S)
+static int tolua_cLuaChunkStay_Enable(lua_State * tolua_S)
+{
+ cLuaState L(tolua_S);
+ if (
+ !L.CheckParamUserType(1, "cLuaChunkStay") ||
+ !L.CheckParamUserType(2, "cWorld") ||
+ !L.CheckParamFunction(3, 4)
+ )
+ {
+ return 0;
+ }
+
+ // Read the params:
+ cLuaChunkStay * ChunkStay = (cLuaChunkStay *)tolua_tousertype(tolua_S, 1, NULL);
+ if (ChunkStay == NULL)
+ {
+ LOGWARNING("cLuaChunkStay:Enable(): invalid self");
+ L.LogStackTrace();
+ return 0;
+ }
+ cWorld * World = (cWorld *)tolua_tousertype(tolua_S, 2, NULL);
+ if (World == NULL)
+ {
+ LOGWARNING("cLuaChunkStay:Enable(): invalid world parameter");
+ L.LogStackTrace();
+ return 0;
+ }
+
+ ChunkStay->Enable(*World, tolua_S, 3, 4);
+ return 0;
+}
+
+
+
+
+
static int tolua_cPlayer_GetGroups(lua_State* tolua_S)
{
cPlayer* self = (cPlayer*) tolua_tousertype(tolua_S,1,0);
@@ -2403,6 +2440,10 @@ void ManualBindings::Bind(lua_State * tolua_S)
tolua_function(tolua_S, "LogStackTrace", tolua_cPluginManager_LogStackTrace);
tolua_endmodule(tolua_S);
+ tolua_beginmodule(tolua_S, "cLuaChunkStay");
+ tolua_function(tolua_S, "Enable", tolua_cLuaChunkStay_Enable);
+ tolua_endmodule(tolua_S);
+
tolua_beginmodule(tolua_S, "cPlayer");
tolua_function(tolua_S, "GetGroups", tolua_cPlayer_GetGroups);
tolua_function(tolua_S, "GetResolvedPermissions", tolua_cPlayer_GetResolvedPermissions);