diff options
author | Mattes D <github@xoft.cz> | 2014-08-27 14:41:29 +0200 |
---|---|---|
committer | Mattes D <github@xoft.cz> | 2014-08-27 14:41:29 +0200 |
commit | fe3d8fd8100ed93a35fe5a7f4080cbab1f913490 (patch) | |
tree | 1fdd2c6e2d170461f0ede4e1ae8337b7d6f3a452 /MCServer/Plugins/Debuggers/Debuggers.lua | |
parent | More basic style fixes. (diff) | |
download | cuberite-fe3d8fd8100ed93a35fe5a7f4080cbab1f913490.tar cuberite-fe3d8fd8100ed93a35fe5a7f4080cbab1f913490.tar.gz cuberite-fe3d8fd8100ed93a35fe5a7f4080cbab1f913490.tar.bz2 cuberite-fe3d8fd8100ed93a35fe5a7f4080cbab1f913490.tar.lz cuberite-fe3d8fd8100ed93a35fe5a7f4080cbab1f913490.tar.xz cuberite-fe3d8fd8100ed93a35fe5a7f4080cbab1f913490.tar.zst cuberite-fe3d8fd8100ed93a35fe5a7f4080cbab1f913490.zip |
Diffstat (limited to 'MCServer/Plugins/Debuggers/Debuggers.lua')
-rw-r--r-- | MCServer/Plugins/Debuggers/Debuggers.lua | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/MCServer/Plugins/Debuggers/Debuggers.lua b/MCServer/Plugins/Debuggers/Debuggers.lua index 81cf02f3c..179935c08 100644 --- a/MCServer/Plugins/Debuggers/Debuggers.lua +++ b/MCServer/Plugins/Debuggers/Debuggers.lua @@ -33,6 +33,7 @@ function Initialize(Plugin) PM:AddHook(cPluginManager.HOOK_PROJECTILE_HIT_BLOCK, OnProjectileHitBlock); PM:AddHook(cPluginManager.HOOK_CHUNK_UNLOADING, OnChunkUnloading); PM:AddHook(cPluginManager.HOOK_WORLD_STARTED, OnWorldStarted); + PM:AddHook(cPluginManager.HOOK_PROJECTILE_HIT_BLOCK, OnProjectileHitBlock); -- _X: Disabled so that the normal operation doesn't interfere with anything -- PM:AddHook(cPluginManager.HOOK_CHUNK_GENERATED, OnChunkGenerated); @@ -1545,3 +1546,15 @@ end + +function OnProjectileHitBlock(a_ProjectileEntity, a_BlockX, a_BlockY, a_BlockZ, a_BlockFace, a_BlockHitPos) + -- This simple test is for testing issue #1326 - simply declaring this hook would crash the server upon call + LOG("Projectile hit block") + LOG(" Projectile EntityID: " .. a_ProjectileEntity:GetUniqueID()) + LOG(" Block: {" .. a_BlockX .. ", " .. a_BlockY .. ", " .. a_BlockZ .. "}, face " .. a_BlockFace) + LOG(" HitPos: {" .. a_BlockHitPos.x .. ", " .. a_BlockHitPos.y .. ", " .. a_BlockHitPos.z .. "}") +end + + + + |