Interface AnimationHandler

All Known Implementing Classes:
CustomAnimationHandlerSession

public interface AnimationHandler
Represents a configured handler that is a part of an animation.

More precisely, a handler represents an action or event that is played by an animation. When an animation is played, all handlers of it start to execute their configured logic.

  • Method Details

    • getType

      Get the type that is represented by this handler instance.
      Returns:
      The type
    • getAnimation

      Animation getAnimation()
      Get the type of which this handler is a part of.
      Returns:
      The animation we do animation logic for
    • getMaxDurationTicks

      @Nullable @Nullable Integer getMaxDurationTicks()
      Get the maximum amount of time this handler can play the logic for in ticks.

      If it's not configured, other factors terminate the handler's session, such as an arena ended.

      Returns:
      Play time in ticks. null if it hasn't been configured
    • hasOffset

      boolean hasOffset()
      Whether there is any offset for any coordinate that isn't 0.0
      Returns:
      true if the animation logic is held exactly at AnimationLocation
    • getOffsetX

      double getOffsetX()
      X offset of AnimationLocation
      Returns:
      The x offset
    • getOffsetY

      double getOffsetY()
      Y offset of AnimationLocation
      Returns:
      The y offset
    • getOffsetZ

      double getOffsetZ()
      Z offset of AnimationLocation
      Returns:
      The z offset