summaryrefslogtreecommitdiffstats
path: root/Server/Plugins/APIDump/Hooks/OnPlayerAnimation.lua
blob: 1af5438219fe9ed573437df5ad96d7e8bbe5e46e (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
return
{
	HOOK_PLAYER_ANIMATION =
	{
		CalledWhen = "A client has sent an Animation packet",
		DefaultFnName = "OnPlayerAnimation",  -- also used as pagename
		Desc = [[
			This hook is called when the server receives an Animation packet from the client.</p>
			<p>
			For the list of animations that are sent by the client, see the
			<a href="http://wiki.vg/Protocol#Animation_.28clientbound.29">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
}