public interface AnimationPhase
Represents an animation with a specific phase, identifier, display name, and item.
This interface defines the structure for objects that handle animation data.
-
Method Summary
Creates a new runner instance for this animation phase.
default String
Gets a short human-readable description of what this phase looks like, shown to admins
when selecting a phase in the editor.
org.bukkit.inventory.ItemStack
Gets the display item associated with this animation.
String
Gets the display name for the animation.
Returns where this animation phase is presented.
String
Gets the unique identifier for this animation.
default Class<?>
String
Gets the required server version for this animation to work.
Gets the current phase of the animation.
default boolean
default boolean
default boolean
boolean
Checks whether this animation is compatible with the current server version.
-
Method Details
-
getType
Gets the current phase of the animation.
- Returns:
- The current phase type of the animation.
-
getId
String getId()
Gets the unique identifier for this animation.
- Returns:
- The ID of the animation, used to uniquely identify it.
-
getDisplayName
String getDisplayName()
Gets the display name for the animation.
This name can be used in UI elements or for identification purposes.
- Returns:
- The display name of the animation.
-
getDisplayItem
org.bukkit.inventory.ItemStack getDisplayItem()
Gets the display item associated with this animation.
This item may be used to visually represent the animation in the interface.
- Returns:
- The item stack representing the display item.
-
isVersionCompatible
boolean isVersionCompatible()
Checks whether this animation is compatible with the current server version.
- Returns:
- true if compatible, false otherwise.
-
getRequiredVersion
String getRequiredVersion()
Gets the required server version for this animation to work.
- Returns:
- the version string required.
-
getEnvironment
Returns where this animation phase is presented.
- Returns:
- animation environment
-
getDescription
default String getDescription()
Gets a short human-readable description of what this phase looks like, shown to admins
when selecting a phase in the editor.
- Returns:
- the description, or
null if none is set.
-
createRunner
Creates a new runner instance for this animation phase.
The runner controls the execution of the animation during crate opening.
- Parameters:
-
handler - the animation handler managing the opening process
-
properties - the properties used to configure this animation
- Returns:
- a new PhaseRunner responsible for running the animation
-
getLegacyDataClass
@Deprecated
default Class<?> getLegacyDataClass()
Deprecated.
Legacy support method.
This method exists only for backwards compatibility with older implementations.
It should not be used in new code and may be removed in future versions.
- Returns:
- the legacy data class, or
null if not applicable
-
isLite
@Internal
@Deprecated
default boolean isLite()
Deprecated.
Indicates whether this feature is lite-only.
If you are creating your animation, you can ignore this.
- Returns:
- true if it requires lite access.
-
isPremium
@Internal
@Deprecated
default boolean isPremium()
Deprecated.
Indicates whether this feature is premium-only.
If you are creating your animation, you can ignore this.
- Returns:
- true if it requires premium access.
-
isPro
@Internal
@Deprecated
default boolean isPro()
Deprecated.
Indicates whether this feature is pro-only.
If you are creating your animation, you can ignore this.
- Returns:
- true if it requires pro access.