summaryrefslogtreecommitdiffstats
path: root/src/Bindings/PluginManager.cpp
diff options
context:
space:
mode:
authorHowaner <franzi.moos@googlemail.com>2015-03-10 20:05:46 +0100
committerHowaner <franzi.moos@googlemail.com>2015-03-10 20:05:46 +0100
commitab420f6cfc8519fb2ec0caa7fb242517244ffcea (patch)
treec31c3538db081516d81959ed8ad00259175441a9 /src/Bindings/PluginManager.cpp
parentChanged return type from AbsorbWater() to void. (diff)
parentFixed client kick/crash if many block changes happend (diff)
downloadcuberite-ab420f6cfc8519fb2ec0caa7fb242517244ffcea.tar
cuberite-ab420f6cfc8519fb2ec0caa7fb242517244ffcea.tar.gz
cuberite-ab420f6cfc8519fb2ec0caa7fb242517244ffcea.tar.bz2
cuberite-ab420f6cfc8519fb2ec0caa7fb242517244ffcea.tar.lz
cuberite-ab420f6cfc8519fb2ec0caa7fb242517244ffcea.tar.xz
cuberite-ab420f6cfc8519fb2ec0caa7fb242517244ffcea.tar.zst
cuberite-ab420f6cfc8519fb2ec0caa7fb242517244ffcea.zip
Diffstat (limited to 'src/Bindings/PluginManager.cpp')
-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);