summaryrefslogtreecommitdiffstats
path: root/source/cPluginManager.cpp
diff options
context:
space:
mode:
authormadmaxoft@gmail.com <madmaxoft@gmail.com@0a769ca7-a7f5-676a-18bf-c427514a06d6>2012-06-16 17:06:14 +0200
committermadmaxoft@gmail.com <madmaxoft@gmail.com@0a769ca7-a7f5-676a-18bf-c427514a06d6>2012-06-16 17:06:14 +0200
commit18a99085f468dfcb4ec2d9f93361b23874364d82 (patch)
tree6a610615d559eea98a9af8a2b34bac35a44b4517 /source/cPluginManager.cpp
parentProper kick reasons! (diff)
downloadcuberite-18a99085f468dfcb4ec2d9f93361b23874364d82.tar
cuberite-18a99085f468dfcb4ec2d9f93361b23874364d82.tar.gz
cuberite-18a99085f468dfcb4ec2d9f93361b23874364d82.tar.bz2
cuberite-18a99085f468dfcb4ec2d9f93361b23874364d82.tar.lz
cuberite-18a99085f468dfcb4ec2d9f93361b23874364d82.tar.xz
cuberite-18a99085f468dfcb4ec2d9f93361b23874364d82.tar.zst
cuberite-18a99085f468dfcb4ec2d9f93361b23874364d82.zip
Diffstat (limited to '')
-rw-r--r--source/cPluginManager.cpp45
1 files changed, 44 insertions, 1 deletions
diff --git a/source/cPluginManager.cpp b/source/cPluginManager.cpp
index 7c0d49ed5..f152911e8 100644
--- a/source/cPluginManager.cpp
+++ b/source/cPluginManager.cpp
@@ -514,7 +514,7 @@ bool cPluginManager::CallHookBlockToPickup(
bool cPluginManager::CallHookWeatherChanged(cWorld * a_World)
{
- HookMap::iterator Plugins = m_Hooks.find(HOOK_POST_CRAFTING);
+ HookMap::iterator Plugins = m_Hooks.find(HOOK_WEATHER_CHANGED);
if (Plugins == m_Hooks.end())
{
return false;
@@ -533,6 +533,49 @@ bool cPluginManager::CallHookWeatherChanged(cWorld * a_World)
+bool cPluginManager::CallHookUpdatingSign(cWorld * a_World, int a_BlockX, int a_BlockY, int a_BlockZ, AString & a_Line1, AString & a_Line2, AString & a_Line3, AString & a_Line4)
+{
+ HookMap::iterator Plugins = m_Hooks.find(HOOK_UPDATING_SIGN);
+ if (Plugins == m_Hooks.end())
+ {
+ return false;
+ }
+ for (PluginList::iterator itr = Plugins->second.begin(); itr != Plugins->second.end(); ++itr)
+ {
+ if ((*itr)->OnUpdatingSign(a_World, a_BlockX, a_BlockY, a_BlockZ, a_Line1, a_Line2, a_Line3, a_Line4))
+ {
+ return true;
+ }
+ }
+ return false;
+}
+
+
+
+
+
+bool cPluginManager::CallHookUpdatedSign(cWorld * a_World, int a_BlockX, int a_BlockY, int a_BlockZ, const AString & a_Line1, const AString & a_Line2, const AString & a_Line3, const AString & a_Line4)
+{
+ HookMap::iterator Plugins = m_Hooks.find(HOOK_UPDATED_SIGN);
+ if (Plugins == m_Hooks.end())
+ {
+ return false;
+ }
+ for (PluginList::iterator itr = Plugins->second.begin(); itr != Plugins->second.end(); ++itr)
+ {
+ if ((*itr)->OnUpdatedSign(a_World, a_BlockX, a_BlockY, a_BlockZ, a_Line1, a_Line2, a_Line3, a_Line4))
+ {
+ return true;
+ }
+ }
+ return false;
+}
+
+
+
+
+
+
cPlugin* cPluginManager::GetPlugin( const char* a_Plugin ) const
{
for( PluginList::const_iterator itr = m_Plugins.begin(); itr != m_Plugins.end(); ++itr )