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 Details

    • getAnimations

      List<AdditionsAnimation> getAnimations()
      Get a list of all animations.
      Returns:
      List<AdditionsAnimation> of all animations.
    • getAnimation

      AdditionsAnimation getAnimation(String id)
      Get an animation by its id.
      Parameters:
      id - The id of the animation.
      Returns:
      AdditionsAnimation when found, null otherwise.
    • createAnimation

      AdditionsAnimation createAnimation(String id, List<String> frames, int interval)
      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

      AdditionsAnimation createAnimation(String id, String staticFrame, int interval)
      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

      void registerAnimation(AdditionsAnimation animation)
      Register an animation;
      Parameters:
      animation - Animation to register.
    • removeAnimation

      void removeAnimation(String id)
      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.