summaryrefslogtreecommitdiffstats
path: root/src/Bindings/PluginManager.cpp
diff options
context:
space:
mode:
authorTycho <work.tycho+git@gmail.com>2014-02-02 15:56:07 +0100
committerTycho <work.tycho+git@gmail.com>2014-02-02 15:56:07 +0100
commit0b0aa5554fbb0179e108f0473f4bf732340d1b95 (patch)
tree36239f98c1c8417483af6a13fed586c32dda811c /src/Bindings/PluginManager.cpp
parentChanged Signiture of OnUpdate (diff)
parentFixed #620 (diff)
downloadcuberite-0b0aa5554fbb0179e108f0473f4bf732340d1b95.tar
cuberite-0b0aa5554fbb0179e108f0473f4bf732340d1b95.tar.gz
cuberite-0b0aa5554fbb0179e108f0473f4bf732340d1b95.tar.bz2
cuberite-0b0aa5554fbb0179e108f0473f4bf732340d1b95.tar.lz
cuberite-0b0aa5554fbb0179e108f0473f4bf732340d1b95.tar.xz
cuberite-0b0aa5554fbb0179e108f0473f4bf732340d1b95.tar.zst
cuberite-0b0aa5554fbb0179e108f0473f4bf732340d1b95.zip
Diffstat (limited to '')
-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);