summaryrefslogtreecommitdiffstats
path: root/src/Bindings/PluginManager.cpp
diff options
context:
space:
mode:
authorjoshi07 <schumacher@20ma.de>2015-03-05 11:52:42 +0100
committerjoshi07 <schumacher@20ma.de>2015-03-05 11:52:42 +0100
commitf71b1fe799eb944b9488019da134a6cc34675605 (patch)
treef142764f84560a9761bf7d70efbdf4f6d28d0421 /src/Bindings/PluginManager.cpp
parentLua API: Fixed md5 and sha1 hex formatting. (diff)
downloadcuberite-f71b1fe799eb944b9488019da134a6cc34675605.tar
cuberite-f71b1fe799eb944b9488019da134a6cc34675605.tar.gz
cuberite-f71b1fe799eb944b9488019da134a6cc34675605.tar.bz2
cuberite-f71b1fe799eb944b9488019da134a6cc34675605.tar.lz
cuberite-f71b1fe799eb944b9488019da134a6cc34675605.tar.xz
cuberite-f71b1fe799eb944b9488019da134a6cc34675605.tar.zst
cuberite-f71b1fe799eb944b9488019da134a6cc34675605.zip
Diffstat (limited to '')
-rw-r--r--src/Bindings/PluginManager.cpp18
1 files changed, 18 insertions, 0 deletions
diff --git a/src/Bindings/PluginManager.cpp b/src/Bindings/PluginManager.cpp
index 9d86c64a2..41b36337e 100644
--- a/src/Bindings/PluginManager.cpp
+++ b/src/Bindings/PluginManager.cpp
@@ -505,6 +505,24 @@ bool cPluginManager::CallHookEntityAddEffect(cEntity & a_Entity, int a_EffectTyp
+bool cPluginManager::CallHookEntityTeleport(cEntity & a_Entity, const Vector3d & a_OldPosition, const Vector3d & a_NewPosition)
+{
+ FIND_HOOK(HOOK_ENTITY_TELEPORT);
+ VERIFY_HOOK;
+
+ for (PluginList::iterator itr = Plugins->second.begin(); itr != Plugins->second.end(); ++itr)
+ {
+ if ((*itr)->OnEntityTeleport(a_Entity, a_OldPosition, a_NewPosition))
+ {
+ return true;
+ }
+ }
+ return false;
+}
+
+
+
+
bool cPluginManager::CallHookExecuteCommand(cPlayer * a_Player, const AStringVector & a_Split)
{
FIND_HOOK(HOOK_EXECUTE_COMMAND);