2013-11-23 15:26:24 -05:00
|
|
|
return
|
|
|
|
{
|
|
|
|
HOOK_PLAYER_ANIMATION =
|
|
|
|
{
|
2017-08-24 05:19:40 -04:00
|
|
|
CalledWhen = "A client has sent an Animation packet",
|
2013-11-23 15:26:24 -05:00
|
|
|
DefaultFnName = "OnPlayerAnimation", -- also used as pagename
|
|
|
|
Desc = [[
|
2017-08-24 05:19:40 -04:00
|
|
|
This hook is called when the server receives an Animation packet from the client.</p>
|
2013-11-23 15:26:24 -05:00
|
|
|
<p>
|
|
|
|
For the list of animations that are sent by the client, see the
|
2017-08-24 05:19:40 -04:00
|
|
|
<a href="http://wiki.vg/Protocol#Animation_.28clientbound.29">Protocol wiki</a>.
|
2013-11-23 15:26:24 -05:00
|
|
|
]],
|
|
|
|
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
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|