-
- All Implemented Interfaces:
public interface SendableAnimation
An Animation associated with a org.bukkit.entity.Player that can be sent to the associated org.bukkit.entity.Player.
-
-
Method Summary
Modifier and Type Method Description abstract Unit
start()
Starts sending the frames of the Animation to the associated org.bukkit.entity.Player. abstract Unit
stop()
Stops sending the frames of the Animation to the associated org.bukkit.entity.Player. abstract Unit
update(AnimationFrame frame)
Sends the given AnimationFrame to the associated org.bukkit.entity.Player and tells the frame to schedule the next frame to be sent. abstract Unit
onStop(Runnable runnable)
Runs the Runnable when the animation is done sending or . abstract Boolean
getIsContinuous()
If true
, then the Animation will loop when it hits the last frame, or until stop is called.abstract Unit
setIsContinuous(Boolean isContinuous)
If true
, then the Animation will loop when it hits the last frame, or until stop is called.abstract Boolean
getIsRunning()
Checks whether or not the animation is currently running. -
-
Method Detail
-
start
abstract Unit start()
Starts sending the frames of the Animation to the associated org.bukkit.entity.Player.
-
stop
abstract Unit stop()
Stops sending the frames of the Animation to the associated org.bukkit.entity.Player.
-
update
abstract Unit update(AnimationFrame frame)
Sends the given AnimationFrame to the associated org.bukkit.entity.Player and tells the frame to schedule the next frame to be sent.
- Parameters:
frame
- The frame to be sent.
-
onStop
abstract Unit onStop(Runnable runnable)
Runs the Runnable when the animation is done sending or .stop is called.
- Parameters:
runnable
- The runnable to be run, when the animation is done sending.
-
getIsContinuous
abstract Boolean getIsContinuous()
If
true
, then the Animation will loop when it hits the last frame, or until stop is called.
-
setIsContinuous
abstract Unit setIsContinuous(Boolean isContinuous)
If
true
, then the Animation will loop when it hits the last frame, or until stop is called.
-
getIsRunning
abstract Boolean getIsRunning()
Checks whether or not the animation is currently running.
If
true
the animation is running and scheduling sending of the frames. Iffalse
the animation isn't running.
-
-
-
-