summaryrefslogtreecommitdiffstats
path: root/src/Bindings/PluginManager.cpp
diff options
context:
space:
mode:
authordaniel0916 <theschokolps@gmail.com>2014-01-25 11:25:22 +0100
committerdaniel0916 <theschokolps@gmail.com>2014-01-25 11:25:22 +0100
commitbac750b24e673358ec55d3bf71c118a749fe5d0c (patch)
treeb939a88d40583897876fe66d6355233fd6ef6b14 /src/Bindings/PluginManager.cpp
parentAPIDump: Added notes about objects across cWorld's task execution. (diff)
downloadcuberite-bac750b24e673358ec55d3bf71c118a749fe5d0c.tar
cuberite-bac750b24e673358ec55d3bf71c118a749fe5d0c.tar.gz
cuberite-bac750b24e673358ec55d3bf71c118a749fe5d0c.tar.bz2
cuberite-bac750b24e673358ec55d3bf71c118a749fe5d0c.tar.lz
cuberite-bac750b24e673358ec55d3bf71c118a749fe5d0c.tar.xz
cuberite-bac750b24e673358ec55d3bf71c118a749fe5d0c.tar.zst
cuberite-bac750b24e673358ec55d3bf71c118a749fe5d0c.zip
Diffstat (limited to 'src/Bindings/PluginManager.cpp')
-rw-r--r--src/Bindings/PluginManager.cpp42
1 files changed, 42 insertions, 0 deletions
diff --git a/src/Bindings/PluginManager.cpp b/src/Bindings/PluginManager.cpp
index 24bb914d1..1bab8cb0f 100644
--- a/src/Bindings/PluginManager.cpp
+++ b/src/Bindings/PluginManager.cpp
@@ -673,6 +673,48 @@ bool cPluginManager::CallHookPlayerBrokenBlock(cPlayer & a_Player, int a_BlockX,
+bool cPluginManager::CallHookPlayerDestroying(cPlayer & a_Player)
+{
+ HookMap::iterator Plugins = m_Hooks.find(HOOK_PLAYER_DESTROYING);
+ if (Plugins == m_Hooks.end())
+ {
+ return false;
+ }
+ for (PluginList::iterator itr = Plugins->second.begin(); itr != Plugins->second.end(); ++itr)
+ {
+ if ((*itr)->OnPlayerDestroying(a_Player))
+ {
+ return true;
+ }
+ }
+ return false;
+}
+
+
+
+
+
+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);