Interface FramedSidebarAnimation<T>

Type Parameters:
T - frame type
All Superinterfaces:
SidebarAnimation<T>
All Known Implementing Classes:
CollectionSidebarAnimation

public interface FramedSidebarAnimation<T> extends SidebarAnimation<T>
A SidebarAnimation with predetermined frames.
  • Method Summary

    Modifier and Type
    Method
    Description
    int
     
    @Unmodifiable @NotNull List<T>
     
    void
    switchFrame(int frameIndex)
    Switches the current frame to specified index

    Methods inherited from interface net.megavex.scoreboardlibrary.api.sidebar.component.animation.SidebarAnimation

    currentFrame, nextFrame
  • Method Details

    • frames

      @NotNull @Unmodifiable @NotNull List<T> frames()
      Returns:
      all frames in this animation
    • currentFrameIndex

      int currentFrameIndex()
      Returns:
      the index of the current frame
    • switchFrame

      void switchFrame(int frameIndex)
      Switches the current frame to specified index
      Parameters:
      frameIndex - the index of the new current frame
      Throws:
      ArrayIndexOutOfBoundsException - if frame is out of bounds