Interface ActionData
- All Known Implementing Classes:
Animation,Image,KillMessages,ProductModifier,Skin
- See Also:
-
Method Summary
Modifier and TypeMethodDescriptiondefault <T extends ActionData>
Tas(ActionDataType<T> type) Casts the action type to the given type for easier usage.default AnimationCasts this action data to an animation.default ImageasImage()Casts this action data to an image.default KillMessagesCasts this action data to a kill message.default ProductModifierCasts this action data to a product modifier.default SkinasSkin()Casts this action data to a skin.getType()Returns the type of this action data.
-
Method Details
-
getType
ActionDataType<?> getType()Returns the type of this action data.- Returns:
- The type represented by this data
-
as
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
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
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
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
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
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
-