Interface AdditionsAnimation


public interface AdditionsAnimation
Additions Animation. Contains all information about an animation, used for tablists and other periodically updated text.
Since:
1.0.3
  • Method Details

    • getId

      String getId()
      Get the unique identifier of this animation.
      Returns:
      The unique identifier of this animation.
    • getFrames

      List<String> getFrames()
      Get all frames of this animation.
      Returns:
      List<String> of all frames.
    • isStatic

      boolean isStatic()
      Whether this animation is static text or an animation. Static text is a single frame, while an animation is a list of frames.
      Returns:
      True if this animation is static, false otherwise.
    • getInterval

      int getInterval()
      Get the update interval.
      Returns:
      Update interval in ticks.
    • setInterval

      void setInterval(int interval)
      Set the update interval of this animation.
      Parameters:
      interval - New update interval in ticks.
    • getCurrentFrame

      String getCurrentFrame()
      Get the current frame value of this animation.
      Returns:
      The current frame value.
    • getCurrentFrameIndex

      int getCurrentFrameIndex()
      Get the current frame index of this animation.
      Returns:
      The current frame index.
    • setCurrentFrameIndex

      void setCurrentFrameIndex(int index)
      Set the current frame of the animation.
      Parameters:
      index - New frame index.
    • nextFrame

      void nextFrame()
      Select the next frame of the animation.
    • setOnUpdate

      void setOnUpdate(Consumer<AdditionsAnimation> consumer)
      Set the optional action that is executed when the animation is updated.
      Parameters:
      consumer - The action to execute.
    • getOnUpdate

      Get the optional action that is executed when the animation is updated.