summaryrefslogtreecommitdiffstats
path: root/source/PluginManager.cpp
diff options
context:
space:
mode:
authormadmaxoft <github@xoft.cz>2013-08-19 09:28:22 +0200
committermadmaxoft <github@xoft.cz>2013-08-19 09:28:22 +0200
commitdd030fa8920d8cf9c863d2ffdcd791edc1749172 (patch)
tree33daa2cddc50cf496b6714a48d781ff9403a68b6 /source/PluginManager.cpp
parentcChunk::SetBlock() now uses cChunk::FastSetBlock() for the common code path. (diff)
downloadcuberite-dd030fa8920d8cf9c863d2ffdcd791edc1749172.tar
cuberite-dd030fa8920d8cf9c863d2ffdcd791edc1749172.tar.gz
cuberite-dd030fa8920d8cf9c863d2ffdcd791edc1749172.tar.bz2
cuberite-dd030fa8920d8cf9c863d2ffdcd791edc1749172.tar.lz
cuberite-dd030fa8920d8cf9c863d2ffdcd791edc1749172.tar.xz
cuberite-dd030fa8920d8cf9c863d2ffdcd791edc1749172.tar.zst
cuberite-dd030fa8920d8cf9c863d2ffdcd791edc1749172.zip
Diffstat (limited to '')
-rw-r--r--source/PluginManager.cpp21
1 files changed, 21 insertions, 0 deletions
diff --git a/source/PluginManager.cpp b/source/PluginManager.cpp
index de1963f91..104f58aaa 100644
--- a/source/PluginManager.cpp
+++ b/source/PluginManager.cpp
@@ -1180,6 +1180,27 @@ bool cPluginManager::CallHookWeatherChanging(cWorld & a_World, eWeather & a_NewW
+bool cPluginManager::CallHookWorldTick(cWorld & a_World, float a_Dt)
+{
+ HookMap::iterator Plugins = m_Hooks.find(HOOK_WORLD_TICK);
+ if (Plugins == m_Hooks.end())
+ {
+ return false;
+ }
+ for (PluginList::iterator itr = Plugins->second.begin(); itr != Plugins->second.end(); ++itr)
+ {
+ if ((*itr)->OnWorldTick(a_World, a_Dt))
+ {
+ return true;
+ }
+ }
+ return false;
+}
+
+
+
+
+
bool cPluginManager::HandleCommand(cPlayer * a_Player, const AString & a_Command, bool a_ShouldCheckPermissions)
{
ASSERT(a_Player != NULL);