summaryrefslogtreecommitdiffstats
path: root/src/Bindings/PluginManager.cpp
diff options
context:
space:
mode:
authorMattes D <github@xoft.cz>2014-02-01 14:08:08 +0100
committerMattes D <github@xoft.cz>2014-02-01 14:08:08 +0100
commit33759197e97000e5be12d4b0daa593c54cdaed7b (patch)
treeb49b2d4e02f973755c7d8007fe1ba082a5666674 /src/Bindings/PluginManager.cpp
parentMerge pull request #613 from UltraCoderRU/master (diff)
parentAdded PlayerDestroyedHook Documentation (diff)
downloadcuberite-33759197e97000e5be12d4b0daa593c54cdaed7b.tar
cuberite-33759197e97000e5be12d4b0daa593c54cdaed7b.tar.gz
cuberite-33759197e97000e5be12d4b0daa593c54cdaed7b.tar.bz2
cuberite-33759197e97000e5be12d4b0daa593c54cdaed7b.tar.lz
cuberite-33759197e97000e5be12d4b0daa593c54cdaed7b.tar.xz
cuberite-33759197e97000e5be12d4b0daa593c54cdaed7b.tar.zst
cuberite-33759197e97000e5be12d4b0daa593c54cdaed7b.zip
Diffstat (limited to 'src/Bindings/PluginManager.cpp')
-rw-r--r--src/Bindings/PluginManager.cpp21
1 files changed, 21 insertions, 0 deletions
diff --git a/src/Bindings/PluginManager.cpp b/src/Bindings/PluginManager.cpp
index e582fde86..a20583550 100644
--- a/src/Bindings/PluginManager.cpp
+++ b/src/Bindings/PluginManager.cpp
@@ -673,6 +673,27 @@ bool cPluginManager::CallHookPlayerBrokenBlock(cPlayer & a_Player, int a_BlockX,
+bool cPluginManager::CallHookPlayerDestroyed(cPlayer & a_Player)
+{
+ HookMap::iterator Plugins = m_Hooks.find(HOOK_PLAYER_DESTROYED);
+ if (Plugins == m_Hooks.end())
+ {
+ return false;
+ }
+ for (PluginList::iterator itr = Plugins->second.begin(); itr != Plugins->second.end(); ++itr)
+ {
+ if ((*itr)->OnPlayerDestroyed(a_Player))
+ {
+ return true;
+ }
+ }
+ return false;
+}
+
+
+
+
+
bool cPluginManager::CallHookPlayerEating(cPlayer & a_Player)
{
HookMap::iterator Plugins = m_Hooks.find(HOOK_PLAYER_EATING);