summaryrefslogtreecommitdiffstats
path: root/src/Bindings/PluginManager.cpp
diff options
context:
space:
mode:
authorLukas Pioch <lukas@zgow.de>2015-05-18 22:29:39 +0200
committerLukas Pioch <lukas@zgow.de>2015-05-18 22:29:39 +0200
commit4d4d1e9c69a15e154bc358f1363b961de80b27d6 (patch)
tree9e95fe63ce0a3d006c71235f107f62bf0f10a86e /src/Bindings/PluginManager.cpp
parentAPIDump: Removed an unneeded global variable. (diff)
downloadcuberite-4d4d1e9c69a15e154bc358f1363b961de80b27d6.tar
cuberite-4d4d1e9c69a15e154bc358f1363b961de80b27d6.tar.gz
cuberite-4d4d1e9c69a15e154bc358f1363b961de80b27d6.tar.bz2
cuberite-4d4d1e9c69a15e154bc358f1363b961de80b27d6.tar.lz
cuberite-4d4d1e9c69a15e154bc358f1363b961de80b27d6.tar.xz
cuberite-4d4d1e9c69a15e154bc358f1363b961de80b27d6.tar.zst
cuberite-4d4d1e9c69a15e154bc358f1363b961de80b27d6.zip
Diffstat (limited to 'src/Bindings/PluginManager.cpp')
-rw-r--r--src/Bindings/PluginManager.cpp36
1 files changed, 36 insertions, 0 deletions
diff --git a/src/Bindings/PluginManager.cpp b/src/Bindings/PluginManager.cpp
index db2493955..cc74c8372 100644
--- a/src/Bindings/PluginManager.cpp
+++ b/src/Bindings/PluginManager.cpp
@@ -525,6 +525,42 @@ bool cPluginManager::CallHookEntityTeleport(cEntity & a_Entity, const Vector3d &
+bool cPluginManager::CallHookEntityChangeWorld(cEntity & a_Entity, cWorld & a_World)
+{
+ FIND_HOOK(HOOK_ENTITY_CHANGE_WORLD);
+ VERIFY_HOOK;
+
+ for (PluginList::iterator itr = Plugins->second.begin(); itr != Plugins->second.end(); ++itr)
+ {
+ if ((*itr)->OnEntityChangeWorld(a_Entity, a_World))
+ {
+ return true;
+ }
+ }
+ return false;
+}
+
+
+
+
+bool cPluginManager::CallHookEntityChangedWorld(cEntity & a_Entity, cWorld & a_World)
+{
+ FIND_HOOK(HOOK_ENTITY_CHANGED_WORLD);
+ VERIFY_HOOK;
+
+ for (PluginList::iterator itr = Plugins->second.begin(); itr != Plugins->second.end(); ++itr)
+ {
+ if ((*itr)->OnEntityChangedWorld(a_Entity, a_World))
+ {
+ return true;
+ }
+ }
+ return false;
+}
+
+
+
+
bool cPluginManager::CallHookExecuteCommand(cPlayer * a_Player, const AStringVector & a_Split, const AString & a_EntireCommand, CommandResult & a_Result)
{
FIND_HOOK(HOOK_EXECUTE_COMMAND);