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 Summary
Modifier and TypeMethodDescriptionGet the type of which this handler is a part of.@Nullable IntegerGet the maximum amount of time this handler can play the logic for in ticks.doubleX offset ofAnimationLocationdoubleY offset ofAnimationLocationdoubleZ offset ofAnimationLocationgetType()Get the type that is represented by this handler instance.booleanWhether there is any offset for any coordinate that isn't 0.0
-
Method Details
-
getType
AnimationHandlerType 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
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.
nullif it hasn't been configured
-
hasOffset
boolean hasOffset()Whether there is any offset for any coordinate that isn't 0.0- Returns:
trueif the animation logic is held exactly atAnimationLocation
-
getOffsetX
double getOffsetX()X offset ofAnimationLocation- Returns:
- The x offset
-
getOffsetY
double getOffsetY()Y offset ofAnimationLocation- Returns:
- The y offset
-
getOffsetZ
double getOffsetZ()Z offset ofAnimationLocation- Returns:
- The z offset
-