Interface ActionData

All Known Implementing Classes:
Animation, Image, KillMessages, ProductModifier, Skin

public interface ActionData
Defines the data of a certain cosmetic item
See Also:
  • Method Details

    • getType

      ActionDataType<?> getType()
      Returns the type of this action data.
      Returns:
      The type represented by this data
    • as

      default <T extends ActionData> T as(ActionDataType<T> type)
      Casts the action type to the given type for easier usage.

      This method does NOT check if the type is correct, so be sure to check it beforehand! Must match getType().

      Type Parameters:
      T - The type to cast to
      Parameters:
      type - The type to cast to
      Returns:
      The casted data
    • asAnimation

      default Animation asAnimation()
      Casts this action data to an animation.

      This method does NOT check if the type is correct, so be sure to check it beforehand! Must match ActionDataType.ANIMATION.

      Returns:
      The casted data
    • asSkin

      default Skin asSkin()
      Casts this action data to a skin.

      This method does NOT check if the type is correct, so be sure to check it beforehand! Must match ActionDataType.SKIN.

      Returns:
      The casted data
    • asImage

      default Image asImage()
      Casts this action data to an image.

      This method does NOT check if the type is correct, so be sure to check it beforehand! Must match ActionDataType.IMAGE.

      Returns:
      The casted data
    • asKillMessages

      default KillMessages asKillMessages()
      Casts this action data to a kill message.

      This method does NOT check if the type is correct, so be sure to check it beforehand! Must match ActionDataType.KILL_MESSAGES.

      Returns:
      The casted data
    • asProductModifier

      default ProductModifier asProductModifier()
      Casts this action data to a product modifier.

      This method does NOT check if the type is correct, so be sure to check it beforehand! Must match ActionDataType.PRODUCT_MODIFIER.

      Returns:
      The casted data