summaryrefslogtreecommitdiffstats
path: root/source/PluginManager.cpp
diff options
context:
space:
mode:
authormadmaxoft@gmail.com <madmaxoft@gmail.com@0a769ca7-a7f5-676a-18bf-c427514a06d6>2013-02-13 20:22:08 +0100
committermadmaxoft@gmail.com <madmaxoft@gmail.com@0a769ca7-a7f5-676a-18bf-c427514a06d6>2013-02-13 20:22:08 +0100
commit8b1a8bee3437f5d8f865e77e27ae15ad4c690f10 (patch)
tree4dfd2af1af81457636feae7f25dedde794ed6be9 /source/PluginManager.cpp
parentAdded a forgotten part of the cBlockArea::FillRelCuboid() function. (diff)
downloadcuberite-8b1a8bee3437f5d8f865e77e27ae15ad4c690f10.tar
cuberite-8b1a8bee3437f5d8f865e77e27ae15ad4c690f10.tar.gz
cuberite-8b1a8bee3437f5d8f865e77e27ae15ad4c690f10.tar.bz2
cuberite-8b1a8bee3437f5d8f865e77e27ae15ad4c690f10.tar.lz
cuberite-8b1a8bee3437f5d8f865e77e27ae15ad4c690f10.tar.xz
cuberite-8b1a8bee3437f5d8f865e77e27ae15ad4c690f10.tar.zst
cuberite-8b1a8bee3437f5d8f865e77e27ae15ad4c690f10.zip
Diffstat (limited to 'source/PluginManager.cpp')
-rw-r--r--source/PluginManager.cpp23
1 files changed, 22 insertions, 1 deletions
diff --git a/source/PluginManager.cpp b/source/PluginManager.cpp
index 8ff4f4e8f..c80c512a0 100644
--- a/source/PluginManager.cpp
+++ b/source/PluginManager.cpp
@@ -905,7 +905,7 @@ bool cPluginManager::CallHookUpdatedSign(cWorld * a_World, int a_BlockX, int a_B
-bool cPluginManager::CallHookWeatherChanged(cWorld * a_World)
+bool cPluginManager::CallHookWeatherChanged(cWorld & a_World)
{
HookMap::iterator Plugins = m_Hooks.find(HOOK_WEATHER_CHANGED);
if (Plugins == m_Hooks.end())
@@ -926,6 +926,27 @@ bool cPluginManager::CallHookWeatherChanged(cWorld * a_World)
+bool cPluginManager::CallHookWeatherChanging(cWorld & a_World, eWeather & a_NewWeather)
+{
+ HookMap::iterator Plugins = m_Hooks.find(HOOK_WEATHER_CHANGING);
+ if (Plugins == m_Hooks.end())
+ {
+ return false;
+ }
+ for (PluginList::iterator itr = Plugins->second.begin(); itr != Plugins->second.end(); ++itr)
+ {
+ if ((*itr)->OnWeatherChanging(a_World, a_NewWeather))
+ {
+ return true;
+ }
+ }
+ return false;
+}
+
+
+
+
+
bool cPluginManager::HandleCommand(cPlayer * a_Player, const AString & a_Command, bool a_ShouldCheckPermissions)
{
ASSERT(a_Player != NULL);