summaryrefslogtreecommitdiffstats
path: root/src/Bindings/LuaState.cpp
diff options
context:
space:
mode:
authorMattes D <github@xoft.cz>2015-05-11 10:39:45 +0200
committerMattes D <github@xoft.cz>2015-05-11 10:39:45 +0200
commit7d66162e3c339e82d56e5144d466cab97eca82ab (patch)
tree5f3f1a00f704c7def6fc18b98c296e964f218815 /src/Bindings/LuaState.cpp
parentMerge pull request #1977 from mc-server/warnings (diff)
parentAPIDump: Added linkification to hook return values. (diff)
downloadcuberite-7d66162e3c339e82d56e5144d466cab97eca82ab.tar
cuberite-7d66162e3c339e82d56e5144d466cab97eca82ab.tar.gz
cuberite-7d66162e3c339e82d56e5144d466cab97eca82ab.tar.bz2
cuberite-7d66162e3c339e82d56e5144d466cab97eca82ab.tar.lz
cuberite-7d66162e3c339e82d56e5144d466cab97eca82ab.tar.xz
cuberite-7d66162e3c339e82d56e5144d466cab97eca82ab.tar.zst
cuberite-7d66162e3c339e82d56e5144d466cab97eca82ab.zip
Diffstat (limited to 'src/Bindings/LuaState.cpp')
-rw-r--r--src/Bindings/LuaState.cpp12
1 files changed, 12 insertions, 0 deletions
diff --git a/src/Bindings/LuaState.cpp b/src/Bindings/LuaState.cpp
index c96ab083a..fb02569c9 100644
--- a/src/Bindings/LuaState.cpp
+++ b/src/Bindings/LuaState.cpp
@@ -958,6 +958,18 @@ void cLuaState::GetStackValue(int a_StackPos, bool & a_ReturnedVal)
+void cLuaState::GetStackValue(int a_StackPos, cPluginManager::CommandResult & a_Result)
+{
+ if (lua_isnumber(m_LuaState, a_StackPos))
+ {
+ a_Result = static_cast<cPluginManager::CommandResult>(static_cast<int>((tolua_tonumber(m_LuaState, a_StackPos, a_Result))));
+ }
+}
+
+
+
+
+
void cLuaState::GetStackValue(int a_StackPos, cRef & a_Ref)
{
a_Ref.RefStack(*this, a_StackPos);