Skip to main content
Version: 2.0.0

Реєстрація анімацій

TestAnimation класс
import com.jodexindustries.donatecase.api.data.animation.JavaAnimationBukkit;
import org.bukkit.Bukkit;

public class TestAnimation extends JavaAnimationBukkit {

@Override
public void start() {
getApi().getAnimationManager().animationPreEnd(getCaseData(), getPlayer(), getUuid(), getWinItem());
Bukkit.getScheduler().runTaskLater(getApi().getDonateCase(), () -> getApi().getAnimationManager().animationEnd(getCaseData(), getPlayer(), getUuid(), getWinItem()), 20L);
}
}
Реєстрація
api.getAnimationManager().registerAnimation(
api.getAnimationManager().builder("test")
.animation(TestAnimation.class)
.description("Here some description")
.build()
);