From dedb414a50328bf00462409d14d8917ff24844be Mon Sep 17 00:00:00 2001 From: "madmaxoft@gmail.com" Date: Tue, 5 Feb 2013 19:57:22 +0000 Subject: Added new hooks: OnChunkAvailable(), OnChunkUnloaded() and OnChunkUnloading(). Modified OnChunkGenerated() signature. http://forum.mc-server.org/showthread.php?tid=464&pid=6312#pid6312 git-svn-id: http://mc-server.googlecode.com/svn/trunk@1193 0a769ca7-a7f5-676a-18bf-c427514a06d6 --- MCServer/Plugins/HookNotify/HookNotify.lua | 27 +++++++++++++++++++++++++++ 1 file changed, 27 insertions(+) (limited to 'MCServer') diff --git a/MCServer/Plugins/HookNotify/HookNotify.lua b/MCServer/Plugins/HookNotify/HookNotify.lua index f04dc023c..efb96fec5 100644 --- a/MCServer/Plugins/HookNotify/HookNotify.lua +++ b/MCServer/Plugins/HookNotify/HookNotify.lua @@ -15,8 +15,11 @@ function Initialize(Plugin) PluginManager = cRoot:Get():GetPluginManager() PluginManager:AddHook(Plugin, cPluginManager.HOOK_BLOCK_TO_PICKUPS); PluginManager:AddHook(Plugin, cPluginManager.HOOK_CHAT); + PluginManager:AddHook(Plugin, cPluginManager.HOOK_CHUNK_AVAILABLE); PluginManager:AddHook(Plugin, cPluginManager.HOOK_CHUNK_GENERATED); PluginManager:AddHook(Plugin, cPluginManager.HOOK_CHUNK_GENERATING); + PluginManager:AddHook(Plugin, cPluginManager.HOOK_CHUNK_UNLOADED); + PluginManager:AddHook(Plugin, cPluginManager.HOOK_CHUNK_UNLOADING); PluginManager:AddHook(Plugin, cPluginManager.HOOK_COLLECTING_PICKUP); PluginManager:AddHook(Plugin, cPluginManager.HOOK_CRAFTING_NO_RECIPE); PluginManager:AddHook(Plugin, cPluginManager.HOOK_DISCONNECT); @@ -99,6 +102,14 @@ end +function OnChunkAvailable(...) + LogHook("OnChunkAvailable", unpack(arg)); +end + + + + + function OnChunkGenerated(...) LogHook("OnChunkGenerated", unpack(arg)); end @@ -115,6 +126,22 @@ end +function OnChunkUnloaded(...) + LogHook("OnChunkUnloaded", unpack(arg)); +end + + + + + +function OnChunkUnloading(...) + LogHook("OnChunkUnloading", unpack(arg)); +end + + + + + function OnPlayerUsingItem(...) LogHook("OnPlayerUsingItem", unpack(arg)); end -- cgit v1.2.3