diff options
author | Howaner <franzi.moos@googlemail.com> | 2015-03-09 22:39:11 +0100 |
---|---|---|
committer | Howaner <franzi.moos@googlemail.com> | 2015-03-09 22:39:11 +0100 |
commit | a96c21fc0d4326ffda93cc78c5dfcfc4bd034e24 (patch) | |
tree | 38dba8f86163283d90d1d6d9d2fa420cb4e99231 /src/Bindings/PluginManager.cpp | |
parent | Readded old comment (diff) | |
parent | Fixed client kick/crash if many block changes happend (diff) | |
download | cuberite-a96c21fc0d4326ffda93cc78c5dfcfc4bd034e24.tar cuberite-a96c21fc0d4326ffda93cc78c5dfcfc4bd034e24.tar.gz cuberite-a96c21fc0d4326ffda93cc78c5dfcfc4bd034e24.tar.bz2 cuberite-a96c21fc0d4326ffda93cc78c5dfcfc4bd034e24.tar.lz cuberite-a96c21fc0d4326ffda93cc78c5dfcfc4bd034e24.tar.xz cuberite-a96c21fc0d4326ffda93cc78c5dfcfc4bd034e24.tar.zst cuberite-a96c21fc0d4326ffda93cc78c5dfcfc4bd034e24.zip |
Diffstat (limited to '')
-rw-r--r-- | src/Bindings/PluginManager.cpp | 18 |
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); |