summaryrefslogtreecommitdiffstats
path: root/MCServer/Plugins
diff options
context:
space:
mode:
authorjoshi07 <schumacher@20ma.de>2015-03-05 11:52:42 +0100
committerjoshi07 <schumacher@20ma.de>2015-03-05 11:52:42 +0100
commitf71b1fe799eb944b9488019da134a6cc34675605 (patch)
treef142764f84560a9761bf7d70efbdf4f6d28d0421 /MCServer/Plugins
parentLua API: Fixed md5 and sha1 hex formatting. (diff)
downloadcuberite-f71b1fe799eb944b9488019da134a6cc34675605.tar
cuberite-f71b1fe799eb944b9488019da134a6cc34675605.tar.gz
cuberite-f71b1fe799eb944b9488019da134a6cc34675605.tar.bz2
cuberite-f71b1fe799eb944b9488019da134a6cc34675605.tar.lz
cuberite-f71b1fe799eb944b9488019da134a6cc34675605.tar.xz
cuberite-f71b1fe799eb944b9488019da134a6cc34675605.tar.zst
cuberite-f71b1fe799eb944b9488019da134a6cc34675605.zip
Diffstat (limited to '')
-rw-r--r--MCServer/Plugins/HookNotify/HookNotify.lua17
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));