From 8b1a8bee3437f5d8f865e77e27ae15ad4c690f10 Mon Sep 17 00:00:00 2001 From: "madmaxoft@gmail.com" Date: Wed, 13 Feb 2013 19:22:08 +0000 Subject: Added HOOK_WEATHER_CHANGING. http://www.mc-server.org/support/index.php?do=details&task_id=299 git-svn-id: http://mc-server.googlecode.com/svn/trunk@1210 0a769ca7-a7f5-676a-18bf-c427514a06d6 --- MCServer/Plugins/HookNotify/HookNotify.lua | 15 ++++++++++++--- 1 file changed, 12 insertions(+), 3 deletions(-) (limited to 'MCServer/Plugins') diff --git a/MCServer/Plugins/HookNotify/HookNotify.lua b/MCServer/Plugins/HookNotify/HookNotify.lua index efb96fec5..92cc2e059 100644 --- a/MCServer/Plugins/HookNotify/HookNotify.lua +++ b/MCServer/Plugins/HookNotify/HookNotify.lua @@ -9,10 +9,10 @@ PLUGIN = {} -- Reference to own plugin object function Initialize(Plugin) PLUGIN = Plugin - Plugin:SetName("HookNotify") - Plugin:SetVersion(1) + Plugin:SetName("HookNotify"); + Plugin:SetVersion(1); - PluginManager = cRoot:Get():GetPluginManager() + PluginManager = cPluginManager:Get(); PluginManager:AddHook(Plugin, cPluginManager.HOOK_BLOCK_TO_PICKUPS); PluginManager:AddHook(Plugin, cPluginManager.HOOK_CHAT); PluginManager:AddHook(Plugin, cPluginManager.HOOK_CHUNK_AVAILABLE); @@ -48,6 +48,7 @@ function Initialize(Plugin) PluginManager:AddHook(Plugin, cPluginManager.HOOK_UPDATED_SIGN); PluginManager:AddHook(Plugin, cPluginManager.HOOK_UPDATING_SIGN); PluginManager:AddHook(Plugin, cPluginManager.HOOK_WEATHER_CHANGED); + PluginManager:AddHook(Plugin, cPluginManager.HOOK_WEATHER_CHANGING); LOGINFO("HookNotify plugin is installed, beware, the log output may be quite large!"); LOGINFO("You want this plugin enabled only when developing another plugin, not for regular gameplay."); @@ -365,6 +366,14 @@ end +function OnWeatherChanging(...) + LogHook("OnWeatherChanging", unpack(arg)); +end + + + + + ------------------------------------------------------------------ -- Special handling for OnTakeDamage to print the contents of TDI: -- cgit v1.2.3