Interface Animation

All Known Implementing Classes:
BaseAnimation, InfiniteAnimation, SimpleAnimation

public interface Animation
  • Method Details

    • reset

      void reset()
      Reset to the initial frame
    • nextFrame

      @Nullable @Nullable Frame nextFrame()
      Go to the next frame
      Returns:
      the next frame or null if it is the last frame
    • start

      void start(BaseGui gui)
      Start the animation
      Parameters:
      gui - The gui to apply the animation to
    • stop

      void stop()
      Stops the animation
    • getDelay

      int getDelay()
      Returns:
      the delay between frames
    • getRunnable

      AnimationRunner getRunnable()
      Returns:
      the bukkit runnable that handles frame updates
    • getGui

      BaseGui getGui()
      Returns:
      the gui that this animation is applyed to
    • of

      @NotNull static @NotNull Animation of(int delay, Frame... frames)
      Create a simple animation that stop at the end of the frames
      Parameters:
      delay - the delay between frames
      frames - the frames
      Returns:
      the animation
    • infinite

      @NotNull static @NotNull Animation infinite(int delay, Frame... frames)
      Create a loop animation
      Parameters:
      delay - the delay between frames
      frames - the frames
      Returns:
      the animation