diff options
author | madmaxoft <github@xoft.cz> | 2013-10-14 22:01:10 +0200 |
---|---|---|
committer | madmaxoft <github@xoft.cz> | 2013-10-14 22:01:10 +0200 |
commit | d34fa4970ac56c3624654f148faafce096243fe7 (patch) | |
tree | 45027f15c4dd9e807c26996c8bbe7e4935efb32c /MCServer/Plugins/APIDump | |
parent | APIDump: Removed HOOK_MAX and HOOK_NUM_HOOKS from documentation. (diff) | |
download | cuberite-d34fa4970ac56c3624654f148faafce096243fe7.tar cuberite-d34fa4970ac56c3624654f148faafce096243fe7.tar.gz cuberite-d34fa4970ac56c3624654f148faafce096243fe7.tar.bz2 cuberite-d34fa4970ac56c3624654f148faafce096243fe7.tar.lz cuberite-d34fa4970ac56c3624654f148faafce096243fe7.tar.xz cuberite-d34fa4970ac56c3624654f148faafce096243fe7.tar.zst cuberite-d34fa4970ac56c3624654f148faafce096243fe7.zip |
Diffstat (limited to 'MCServer/Plugins/APIDump')
-rw-r--r-- | MCServer/Plugins/APIDump/APIDesc.lua | 21 |
1 files changed, 21 insertions, 0 deletions
diff --git a/MCServer/Plugins/APIDump/APIDesc.lua b/MCServer/Plugins/APIDump/APIDesc.lua index 3c9ee9421..e7ed25cdc 100644 --- a/MCServer/Plugins/APIDump/APIDesc.lua +++ b/MCServer/Plugins/APIDump/APIDesc.lua @@ -2611,6 +2611,27 @@ end; ]], }, -- HOOK_LOGIN + HOOK_PLAYER_ANIMATION = + { + CalledWhen = "A client has sent an Animation packet (0x12)", + DefaultFnName = "OnPlayerAnimation", -- also used as pagename + Desc = [[ + This hook is called when the server receives an Animation packet (0x12) from the client.</p> + <p> + For the list of animations that are sent by the client, see the + <a href="http://wiki.vg/Protocol#0x12">Protocol wiki</a>. + ]], + Params = + { + { Name = "Player", Type = "{{cPlayer}}", Notes = "The player from whom the packet was received" }, + { Name = "Animation", Type = "number", Notes = "The kind of animation" }, + }, + Returns = [[ + If the function returns false or no value, the next plugin's callback is called. Afterwards, the + server broadcasts the animation packet to all nearby clients. If the function returns true, no other + callback is called for this event and the packet is not broadcasted. + ]], + }, -- HOOK_PLAYER_ANIMATION }, -- Hooks[] |