diff options
author | madmaxoft <github@xoft.cz> | 2014-01-05 15:46:45 +0100 |
---|---|---|
committer | madmaxoft <github@xoft.cz> | 2014-01-05 15:46:45 +0100 |
commit | 84bf32f857f890ce50c82a2612fe1bfe072886c9 (patch) | |
tree | 68438c416ed73fd80a7f2f91e1b005edc50bd931 /MCServer/Plugins/Debuggers/Debuggers.lua | |
parent | Fixed a race condition in the cQueue class. (diff) | |
download | cuberite-84bf32f857f890ce50c82a2612fe1bfe072886c9.tar cuberite-84bf32f857f890ce50c82a2612fe1bfe072886c9.tar.gz cuberite-84bf32f857f890ce50c82a2612fe1bfe072886c9.tar.bz2 cuberite-84bf32f857f890ce50c82a2612fe1bfe072886c9.tar.lz cuberite-84bf32f857f890ce50c82a2612fe1bfe072886c9.tar.xz cuberite-84bf32f857f890ce50c82a2612fe1bfe072886c9.tar.zst cuberite-84bf32f857f890ce50c82a2612fe1bfe072886c9.zip |
Diffstat (limited to '')
-rw-r--r-- | MCServer/Plugins/Debuggers/Debuggers.lua | 19 |
1 files changed, 19 insertions, 0 deletions
diff --git a/MCServer/Plugins/Debuggers/Debuggers.lua b/MCServer/Plugins/Debuggers/Debuggers.lua index 8f2fa3682..c769edc3e 100644 --- a/MCServer/Plugins/Debuggers/Debuggers.lua +++ b/MCServer/Plugins/Debuggers/Debuggers.lua @@ -963,3 +963,22 @@ end + +-- Test the hook adding formats in #121 and #401 +local function DoNothing() +end + +LOG("Trying cPluginManager:AddHook()"); +cPluginManager:AddHook(cPluginManager.HOOK_CHAT, DoNothing); + +LOG("Trying cPluginManager.AddHook()"); +cPluginManager.AddHook(cPluginManager.HOOK_CHAT, DoNothing); + +LOG("Trying cPluginManager:Get():AddHook()"); +cPluginManager:Get():AddHook(cPluginManager.HOOK_CHAT, DoNothing); + +LOG("Trying cPluginManager:Get():AddHook(Plugin, Hook)"); +cPluginManager:Get():AddHook(cPluginManager:GetCurrentPlugin(), cPluginManager.HOOK_CHAT); + +LOG("Trying cPluginManager.AddHook(Plugin, Hook)"); +cPluginManager.AddHook(cPluginManager:GetCurrentPlugin(), cPluginManager.HOOK_CHAT); |