public interface OpeningAnimationHandler
Interface to handle the opening animation lifecycle for a crate.
This interface defines the methods necessary to access and manage
the opening animation, including tracking the current phase,
and accessing the player and crate involved.
-
Method Summary
Gets the crate instance associated with this opening animation.
Gets the runner responsible for handling the current phase's animation.
int
Gets the current phase index in the animation sequence.
Gets a list of all animation phases that this opening animation handler will run through.
org.bukkit.entity.Player
Gets the player associated with this opening animation.
Gets the session for this opening animation, which tracks the overall
state and progress of the crate opening.
void
Advances the animation to the next phase in the sequence.
-
Method Details
-
getPlayer
org.bukkit.entity.Player getPlayer()
Gets the player associated with this opening animation.
- Returns:
- The player involved in the opening animation.
-
getSession
Gets the session for this opening animation, which tracks the overall
state and progress of the crate opening.
- Type Parameters:
-
T - the specific type of OpeningSession returned
- Returns:
- the current opening session of type T
-
getCrate
Gets the crate instance associated with this opening animation.
- Returns:
- The crate instance being opened in this animation.
-
getCurrentPhaseIndex
int getCurrentPhaseIndex()
Gets the current phase index in the animation sequence.
- Returns:
- The current phase index.
-
getCurrentPhase
Gets the runner responsible for handling the current phase's animation.
- Returns:
- The current animation runner (phase).
-
getPhases
Gets a list of all animation phases that this opening animation handler will run through.
- Returns:
- A list of animation runners (phases).
-
nextPhase
void nextPhase()
Advances the animation to the next phase in the sequence.