diff options
author | madmaxoft <github@xoft.cz> | 2013-08-02 08:44:06 +0200 |
---|---|---|
committer | madmaxoft <github@xoft.cz> | 2013-08-02 08:44:06 +0200 |
commit | 3531bdb60b858a232f23bb8651b75afcd79e57e5 (patch) | |
tree | f4e5557421b2320a6ec817af967aab37e6fe0bbc /source/PluginManager.cpp | |
parent | New players get full health (diff) | |
download | cuberite-3531bdb60b858a232f23bb8651b75afcd79e57e5.tar cuberite-3531bdb60b858a232f23bb8651b75afcd79e57e5.tar.gz cuberite-3531bdb60b858a232f23bb8651b75afcd79e57e5.tar.bz2 cuberite-3531bdb60b858a232f23bb8651b75afcd79e57e5.tar.lz cuberite-3531bdb60b858a232f23bb8651b75afcd79e57e5.tar.xz cuberite-3531bdb60b858a232f23bb8651b75afcd79e57e5.tar.zst cuberite-3531bdb60b858a232f23bb8651b75afcd79e57e5.zip |
Diffstat (limited to '')
-rw-r--r-- | source/PluginManager.cpp | 21 |
1 files changed, 21 insertions, 0 deletions
diff --git a/source/PluginManager.cpp b/source/PluginManager.cpp index 043390cbc..412200256 100644 --- a/source/PluginManager.cpp +++ b/source/PluginManager.cpp @@ -678,6 +678,27 @@ bool cPluginManager::CallHookPlayerRightClick(cPlayer & a_Player, int a_BlockX, +bool cPluginManager::CallHookPlayerRightClickingEntity(cPlayer & a_Player, cEntity & a_Entity) +{ + HookMap::iterator Plugins = m_Hooks.find(HOOK_PLAYER_RIGHT_CLICKING_ENTITY); + if (Plugins == m_Hooks.end()) + { + return false; + } + for (PluginList::iterator itr = Plugins->second.begin(); itr != Plugins->second.end(); ++itr) + { + if ((*itr)->OnPlayerRightClickingEntity(a_Player, a_Entity)) + { + return true; + } + } + return false; +} + + + + + bool cPluginManager::CallHookPlayerShooting(cPlayer & a_Player) { HookMap::iterator Plugins = m_Hooks.find(HOOK_PLAYER_SHOOTING); |