Interface AnimationManager
public interface AnimationManager
Additions Animation Manager.
Handles the registrations of
AdditionsAnimation
and the updating of the animation frames.- Since:
- 1.0.3
-
Method Summary
Modifier and TypeMethodDescriptioncreateAnimation
(String id, String staticFrame, int interval) Create a new animation.createAnimation
(String id, List<String> frames, int interval) Create a new animation.getAnimation
(String id) Get an animation by its id.Get a list of all animations.int
Get the bukkit task id of the animation manager.void
registerAnimation
(AdditionsAnimation animation) Register an animation;void
Remove an animation by its id.void
start()
Start the Bukkit task to update the animations.
-
Method Details
-
getAnimations
List<AdditionsAnimation> getAnimations()Get a list of all animations.- Returns:
List<AdditionsAnimation>
of all animations.
-
getAnimation
Get an animation by its id.- Parameters:
id
- The id of the animation.- Returns:
AdditionsAnimation
when found, null otherwise.
-
createAnimation
Create a new animation.- Parameters:
id
- The id of the animation.frames
- The frames of the animation.interval
- The update interval of the animation.- Returns:
- The created
AdditionsAnimation
or null when failed.
-
createAnimation
Create a new animation.- Parameters:
id
- The id of the animation.staticFrame
- The static frame of the animation.interval
- The update interval of the animation.- Returns:
- The created
AdditionsAnimation
or null when failed.
-
registerAnimation
Register an animation;- Parameters:
animation
- Animation to register.
-
removeAnimation
Remove an animation by its id.- Parameters:
id
- The id of the animation.
-
start
void start()Start the Bukkit task to update the animations. -
getBukkitTaskId
int getBukkitTaskId()Get the bukkit task id of the animation manager.- Returns:
- The bukkit task id.
-