summaryrefslogtreecommitdiffstats
path: root/source/Plugin_NewLua.h
diff options
context:
space:
mode:
authorAlexander Harkness <bearbin@gmail.com>2013-08-07 19:37:03 +0200
committerAlexander Harkness <bearbin@gmail.com>2013-08-07 19:37:03 +0200
commitbe7a6d7a6679fd17e88e9f5131036d69978e4151 (patch)
tree8e1b46a9b8ac8d3d47a65f903a63e063e5550e94 /source/Plugin_NewLua.h
parentDrag in the latest core changes. (diff)
parentMerge pull request #48 from mc-server/BlockTracing (diff)
downloadcuberite-be7a6d7a6679fd17e88e9f5131036d69978e4151.tar
cuberite-be7a6d7a6679fd17e88e9f5131036d69978e4151.tar.gz
cuberite-be7a6d7a6679fd17e88e9f5131036d69978e4151.tar.bz2
cuberite-be7a6d7a6679fd17e88e9f5131036d69978e4151.tar.lz
cuberite-be7a6d7a6679fd17e88e9f5131036d69978e4151.tar.xz
cuberite-be7a6d7a6679fd17e88e9f5131036d69978e4151.tar.zst
cuberite-be7a6d7a6679fd17e88e9f5131036d69978e4151.zip
Diffstat (limited to 'source/Plugin_NewLua.h')
-rw-r--r--source/Plugin_NewLua.h11
1 files changed, 3 insertions, 8 deletions
diff --git a/source/Plugin_NewLua.h b/source/Plugin_NewLua.h
index a79affd5d..d31a62601 100644
--- a/source/Plugin_NewLua.h
+++ b/source/Plugin_NewLua.h
@@ -3,6 +3,7 @@
#include "Plugin.h"
#include "WebPlugin.h"
+#include "LuaState.h"
// Names for the global variables through which the plugin is identified in its LuaState
#define LUA_PLUGIN_NAME_VAR_NAME "_MCServerInternal_PluginName"
@@ -11,9 +12,6 @@
-// fwd: Lua
-typedef struct lua_State lua_State;
-
// fwd: UI/Window.h
class cWindow;
@@ -99,7 +97,7 @@ public:
/// Binds the console command to call the function specified by a Lua function reference. Simply adds to CommandMap.
void BindConsoleCommand(const AString & a_Command, int a_FnRef);
- lua_State * GetLuaState(void) { return m_LuaState; }
+ cLuaState & GetLuaState(void) { return m_LuaState; }
cCriticalSection & GetCriticalSection(void) { return m_CriticalSection; }
@@ -114,7 +112,7 @@ public:
protected:
cCriticalSection m_CriticalSection;
- lua_State * m_LuaState;
+ cLuaState m_LuaState;
/// Maps command name into Lua function reference
typedef std::map<AString, int> CommandMap;
@@ -122,9 +120,6 @@ protected:
CommandMap m_Commands;
CommandMap m_ConsoleCommands;
- bool PushFunction(const char * a_FunctionName, bool a_bLogError = true);
- bool CallFunction(int a_NumArgs, int a_NumResults, const char * a_FunctionName ); // a_FunctionName is only used for error messages, nothing else
-
/// Returns the name of Lua function that should handle the specified hook
const char * GetHookFnName(cPluginManager::PluginHook a_Hook);
} ; // tolua_export