summaryrefslogtreecommitdiffstats
path: root/src/Bindings
diff options
context:
space:
mode:
authorTycho <work.tycho+git@gmail.com>2014-01-26 15:28:51 +0100
committerTycho <work.tycho+git@gmail.com>2014-01-26 15:28:51 +0100
commitbed2ee22e8283a2e8bd0790a89124839319c2fc3 (patch)
treeee9e66a7b7c63995797a502f209079c1422ce9c9 /src/Bindings
parentRefactored cBlockHandler::OnUse and dependents (diff)
parentMerge pull request #589 from mc-server/minecartimprovements (diff)
downloadcuberite-bed2ee22e8283a2e8bd0790a89124839319c2fc3.tar
cuberite-bed2ee22e8283a2e8bd0790a89124839319c2fc3.tar.gz
cuberite-bed2ee22e8283a2e8bd0790a89124839319c2fc3.tar.bz2
cuberite-bed2ee22e8283a2e8bd0790a89124839319c2fc3.tar.lz
cuberite-bed2ee22e8283a2e8bd0790a89124839319c2fc3.tar.xz
cuberite-bed2ee22e8283a2e8bd0790a89124839319c2fc3.tar.zst
cuberite-bed2ee22e8283a2e8bd0790a89124839319c2fc3.zip
Diffstat (limited to '')
-rw-r--r--src/Bindings/AllToLua.bat4
-rw-r--r--src/Bindings/CMakeLists.txt24
-rw-r--r--src/Bindings/PluginManager.cpp2
3 files changed, 5 insertions, 25 deletions
diff --git a/src/Bindings/AllToLua.bat b/src/Bindings/AllToLua.bat
index b2a192880..f085af9e9 100644
--- a/src/Bindings/AllToLua.bat
+++ b/src/Bindings/AllToLua.bat
@@ -4,17 +4,21 @@
:: When called without any parameters, it will pause for a keypress at the end
:: Call with any parameter to disable the wait (for buildserver use)
+@echo off
+
:: Regenerate the files:
+echo Regenerating LUA bindings . . .
"tolua++.exe" -L virtual_method_hooks.lua -o Bindings.cpp -H Bindings.h AllToLua.pkg
: Wait for keypress, if no param given:
+echo.
if %ALLTOLUA_WAIT%N == N pause
diff --git a/src/Bindings/CMakeLists.txt b/src/Bindings/CMakeLists.txt
deleted file mode 100644
index 50b81e42a..000000000
--- a/src/Bindings/CMakeLists.txt
+++ /dev/null
@@ -1,24 +0,0 @@
-
-cmake_minimum_required (VERSION 2.6)
-project (MCServer)
-
-# NOTE: This CMake file is processed only for Unix builds; Windows(MSVC) builds handle all the subfolders in /src in a single file, /src/CMakeLists.txt
-
-include_directories ("${PROJECT_SOURCE_DIR}/../")
-
-ADD_CUSTOM_COMMAND(
- # add any new generated bindings here
- OUTPUT ${CMAKE_CURRENT_SOURCE_DIR}/Bindings.cpp ${CMAKE_CURRENT_SOURCE_DIR}/Bindings.h
-
- # command execuded to regerate bindings
- COMMAND tolua -L virtual_method_hooks.lua -o Bindings.cpp -H Bindings.h AllToLua.pkg
- WORKING_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}
-
- # add any new generation dependencies here
- DEPENDS ${CMAKE_CURRENT_SOURCE_DIR}/virtual_method_hooks.lua ${CMAKE_CURRENT_SOURCE_DIR}/AllToLua.pkg tolua
-)
-
-#add cpp files here
-add_library(Bindings PluginManager LuaState WebPlugin Bindings ManualBindings LuaWindow Plugin PluginLua WebPlugin)
-
-target_link_libraries(Bindings lua sqlite tolualib)
diff --git a/src/Bindings/PluginManager.cpp b/src/Bindings/PluginManager.cpp
index 92c06487c..e582fde86 100644
--- a/src/Bindings/PluginManager.cpp
+++ b/src/Bindings/PluginManager.cpp
@@ -1740,7 +1740,7 @@ bool cPluginManager::DoWithPlugin(const AString & a_PluginName, cPluginCallback
{
// TODO: Implement locking for plugins
PluginMap::iterator itr = m_Plugins.find(a_PluginName);
- if (itr == m_Plugins.end())
+ if ((itr == m_Plugins.end()) || (itr->second == NULL))
{
return false;
}