diff options
author | Howaner <franzi.moos@googlemail.com> | 2015-03-09 22:39:11 +0100 |
---|---|---|
committer | Howaner <franzi.moos@googlemail.com> | 2015-03-09 22:39:11 +0100 |
commit | a96c21fc0d4326ffda93cc78c5dfcfc4bd034e24 (patch) | |
tree | 38dba8f86163283d90d1d6d9d2fa420cb4e99231 /MCServer/Plugins/HookNotify/HookNotify.lua | |
parent | Readded old comment (diff) | |
parent | Fixed client kick/crash if many block changes happend (diff) | |
download | cuberite-a96c21fc0d4326ffda93cc78c5dfcfc4bd034e24.tar cuberite-a96c21fc0d4326ffda93cc78c5dfcfc4bd034e24.tar.gz cuberite-a96c21fc0d4326ffda93cc78c5dfcfc4bd034e24.tar.bz2 cuberite-a96c21fc0d4326ffda93cc78c5dfcfc4bd034e24.tar.lz cuberite-a96c21fc0d4326ffda93cc78c5dfcfc4bd034e24.tar.xz cuberite-a96c21fc0d4326ffda93cc78c5dfcfc4bd034e24.tar.zst cuberite-a96c21fc0d4326ffda93cc78c5dfcfc4bd034e24.zip |
Diffstat (limited to 'MCServer/Plugins/HookNotify/HookNotify.lua')
-rw-r--r-- | MCServer/Plugins/HookNotify/HookNotify.lua | 17 |
1 files changed, 17 insertions, 0 deletions
diff --git a/MCServer/Plugins/HookNotify/HookNotify.lua b/MCServer/Plugins/HookNotify/HookNotify.lua index ed791090e..1d3d5088e 100644 --- a/MCServer/Plugins/HookNotify/HookNotify.lua +++ b/MCServer/Plugins/HookNotify/HookNotify.lua @@ -23,6 +23,7 @@ function Initialize(Plugin) cPluginManager.AddHook(cPluginManager.HOOK_COLLECTING_PICKUP, OnCollectingPickup); cPluginManager.AddHook(cPluginManager.HOOK_CRAFTING_NO_RECIPE, OnCraftingNoRecipe); cPluginManager.AddHook(cPluginManager.HOOK_DISCONNECT, OnDisconnect); + cPluginManager.AddHook(cPluginManager.HOOK_ENTITY_TELEPORT, OnEntityTeleport); cPluginManager.AddHook(cPluginManager.HOOK_EXECUTE_COMMAND, OnExecuteCommand); cPluginManager.AddHook(cPluginManager.HOOK_HANDSHAKE, OnHandshake); cPluginManager.AddHook(cPluginManager.HOOK_KILLING, OnKilling); @@ -179,6 +180,22 @@ end +function OnEntityTeleport(arg1,arg2,arg3) + if arg1.IsPlayer() then + -- if it's a player, get his name + LOG("OnEntityTeleport: Player: " .. arg1.GetName()); + else + -- if it's a entity, get its type + LOG("OnEntityTeleport: EntityType: " .. arg1.GetEntityType()); + end + LOG("OldPos: " .. arg2.x .. " / " .. arg2.y .. " / " .. arg2.z); + LOG("NewPos: " .. arg3.x .. " / " .. arg3.y .. " / " .. arg3.z); +end + + + + + function OnExecuteCommand(...) LogHook("OnExecuteCommand", unpack(arg)); |