Class AnimatedBlockHelper
java.lang.Object
nl.pim16aap2.animatedarchitecture.spigot.core.animation.AnimatedBlockHelper
Helper class for animated blocks.
-
Method Summary
Modifier and TypeMethodDescriptionvoidrecoverAnimatedBlock(@Nullable org.bukkit.entity.Entity entity) Attempts to recover an animated block from an entity.voidsetRecoveryData(org.bukkit.entity.BlockDisplay entity, @Nullable IAnimatedBlockRecoveryData recoveryData) Sets the recovery data for an animated block entity.
-
Method Details
-
recoverAnimatedBlock
public void recoverAnimatedBlock(@Nullable @Nullable org.bukkit.entity.Entity entity) Attempts to recover an animated block from an entity.If the entity is not an animated block (or null), this method does nothing.
If the entity is an animated block, this method will attempt to perform a recovery action by calling
IAnimatedBlockRecoveryData.recover(). If the recovery action is successful, the entity will be removed.- Parameters:
entity- The entity for which to attempt recovery.
-
setRecoveryData
public void setRecoveryData(org.bukkit.entity.BlockDisplay entity, @Nullable @Nullable IAnimatedBlockRecoveryData recoveryData) Sets the recovery data for an animated block entity.- Parameters:
entity- The entity to set the recovery data for.recoveryData- The recovery data to set for the entity.
-