Player class
Part of Animations
Player extensions of the Animations plugin: starting and leaving an animation, and asking which one a player is playing. The server does the work; a client can only ask the server on behalf of its own local player.
Summary
Methods
Animations:leave.Animations:play.Methods
Returns the animation of the Animations plugin that the player is playing.
Returns
- String ID of the animation, nil if the player is not playing one
Makes the player leave the animation they are playing, with its exit sequence if it has
one, see Animations:leave. Clientside it asks the server to do so for the local player
and does nothing when called on another player.
Returns
- Boolean false if the player is not playing an animation; nothing clientside
Makes the player play a registered animation, see Animations:play. Clientside it asks
the server to start the animation for the local player, or to make them leave the one
they are playing, as the context menu does; the server notifies the player if it refuses.
Does nothing clientside when called on another player.
Parameters
- id String ID of the registered animation
Returns
- Boolean whether the animation has started
- String phrase that says why not
- Map arguments of the phrase or nil; nothing clientside