Playing Animations

Getting DisplayAnimations

//DisplayAnimations are the serializable version of a SpawnedDisplayAnimation

//Get a DisplayAnimation from a storage location (LOCAL, MONGODB, or MYSQL)
DisplayAnimation savedAnimation = DisplayAnimationManager.getAnimation(LoadMethod.LOCAL, "animationTag");

//Get a DisplayAnimation from an InputStream
DisplayAnimation savedAnimation = DisplayAnimationManager.getAnimation(InputStream);

//Get a DisplayAnimation from a File
DisplayAnimation savedAnimation = DisplayAnimationManager.getAnimation(File);

//Get a DisplayAnimation stored in a plugin's resources
DisplayAnimation savedAnimation = DisplayAnimationManager.getAnimation(MyPlugin.getInstance(), "animationTag");

Getting a SpawnedDisplayAnimation (Playable)

DisplayAnimation savedAnimation = yourMethodToGetADisplayAnimation();

//Convert DisplayAnimation into a SpawnedDisplayAnimation
SpawnedDisplayAnimation spawnedAnimation = savedAnimation.toSpawnedDisplayAnimation();

//Get a SpawnedDisplayAnimation from cache or storage (cache prioritized)
SpawnedDisplayAnimation cacheOrStorageAnimation = DisplayAnimationManager.getSpawnedDisplayAnimation("animationTag", LoadMethod.LOCAL);

//Get a SpawnedDisplayAnimation ONLY if cached
SpawnedDisplayAnimation cachedOnlyAnimation = DisplayAnimationManager.getCachedAnimation("animationTag");

Playing and Stopping Animations

Animate with a DisplayAnimator

Playing Animation Cameras

Reverse Animations

Serialize and save an animation

Last updated