summaryrefslogtreecommitdiffstats
path: root/source/PluginManager.cpp
diff options
context:
space:
mode:
authormadmaxoft <github@xoft.cz>2013-08-09 14:58:43 +0200
committermadmaxoft <github@xoft.cz>2013-08-09 14:58:43 +0200
commitd4a3c451c43454176af39aad5cede5281615a6ad (patch)
treea3dc0500db414ed3b03ca5b983353400dcae4bcd /source/PluginManager.cpp
parentMerge pull request #52 from ravenscroftj/feature/food (diff)
downloadcuberite-d4a3c451c43454176af39aad5cede5281615a6ad.tar
cuberite-d4a3c451c43454176af39aad5cede5281615a6ad.tar.gz
cuberite-d4a3c451c43454176af39aad5cede5281615a6ad.tar.bz2
cuberite-d4a3c451c43454176af39aad5cede5281615a6ad.tar.lz
cuberite-d4a3c451c43454176af39aad5cede5281615a6ad.tar.xz
cuberite-d4a3c451c43454176af39aad5cede5281615a6ad.tar.zst
cuberite-d4a3c451c43454176af39aad5cede5281615a6ad.zip
Diffstat (limited to 'source/PluginManager.cpp')
-rw-r--r--source/PluginManager.cpp42
1 files changed, 42 insertions, 0 deletions
diff --git a/source/PluginManager.cpp b/source/PluginManager.cpp
index 5a81cccbc..44e47733c 100644
--- a/source/PluginManager.cpp
+++ b/source/PluginManager.cpp
@@ -426,6 +426,48 @@ bool cPluginManager::CallHookExecuteCommand(cPlayer * a_Player, const AStringVec
+bool cPluginManager::CallHookExploded(cWorld & a_World, double a_ExplosionSize, bool a_CanCauseFire, double a_X, double a_Y, double a_Z, eExplosionSource a_Source, void * a_SourceData)
+{
+ HookMap::iterator Plugins = m_Hooks.find(HOOK_EXPLODED);
+ if (Plugins == m_Hooks.end())
+ {
+ return false;
+ }
+ for (PluginList::iterator itr = Plugins->second.begin(); itr != Plugins->second.end(); ++itr)
+ {
+ if ((*itr)->OnExploded(a_World, a_ExplosionSize, a_CanCauseFire, a_X, a_Y, a_Z, a_Source, a_SourceData))
+ {
+ return true;
+ }
+ }
+ return false;
+}
+
+
+
+
+
+bool cPluginManager::CallHookExploding(cWorld & a_World, double & a_ExplosionSize, bool & a_CanCauseFire, double a_X, double a_Y, double a_Z, eExplosionSource a_Source, void * a_SourceData)
+{
+ HookMap::iterator Plugins = m_Hooks.find(HOOK_EXPLODING);
+ if (Plugins == m_Hooks.end())
+ {
+ return false;
+ }
+ for (PluginList::iterator itr = Plugins->second.begin(); itr != Plugins->second.end(); ++itr)
+ {
+ if ((*itr)->OnExploding(a_World, a_ExplosionSize, a_CanCauseFire, a_X, a_Y, a_Z, a_Source, a_SourceData))
+ {
+ return true;
+ }
+ }
+ return false;
+}
+
+
+
+
+
bool cPluginManager::CallHookHandshake(cClientHandle * a_ClientHandle, const AString & a_Username)
{
HookMap::iterator Plugins = m_Hooks.find(HOOK_HANDSHAKE);