summaryrefslogtreecommitdiffstats
path: root/MCServer/Plugins/APIDump/Hooks/OnPlayerAnimation.lua
diff options
context:
space:
mode:
authorTiger Wang <ziwei.tiger@hotmail.co.uk>2013-12-10 01:33:48 +0100
committerTiger Wang <ziwei.tiger@hotmail.co.uk>2013-12-10 01:33:48 +0100
commitbc8d926398fd173b1e4345f2c68c04f5e1bc0a56 (patch)
treeb93bf97bf73a14270e6fcf08564ff2f78a4dab79 /MCServer/Plugins/APIDump/Hooks/OnPlayerAnimation.lua
parentFixed Floody lava to stone fizzle (diff)
downloadcuberite-bc8d926398fd173b1e4345f2c68c04f5e1bc0a56.tar
cuberite-bc8d926398fd173b1e4345f2c68c04f5e1bc0a56.tar.gz
cuberite-bc8d926398fd173b1e4345f2c68c04f5e1bc0a56.tar.bz2
cuberite-bc8d926398fd173b1e4345f2c68c04f5e1bc0a56.tar.lz
cuberite-bc8d926398fd173b1e4345f2c68c04f5e1bc0a56.tar.xz
cuberite-bc8d926398fd173b1e4345f2c68c04f5e1bc0a56.tar.zst
cuberite-bc8d926398fd173b1e4345f2c68c04f5e1bc0a56.zip
Diffstat (limited to 'MCServer/Plugins/APIDump/Hooks/OnPlayerAnimation.lua')
-rw-r--r--MCServer/Plugins/APIDump/Hooks/OnPlayerAnimation.lua28
1 files changed, 28 insertions, 0 deletions
diff --git a/MCServer/Plugins/APIDump/Hooks/OnPlayerAnimation.lua b/MCServer/Plugins/APIDump/Hooks/OnPlayerAnimation.lua
new file mode 100644
index 000000000..baf99834e
--- /dev/null
+++ b/MCServer/Plugins/APIDump/Hooks/OnPlayerAnimation.lua
@@ -0,0 +1,28 @@
+return
+{
+ 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
+}
+
+
+
+