A framework for creating animations easily
To install you can use maven or gradle
Add this repository in your list:
🎇Maven repository
<repositories>
...
<repository>
<id>jitpack.io</id>
<url>https://jitpack.io</url>
</repository>
</repositories>🎊 Gradle repository
repositories {
...
maven { url 'https://jitpack.io' }
}Add the project dependency to your dependencies list:
🎇Maven dependency
<dependency>
<groupId>com.github.Yuhtin</groupId>
<artifactId>animations</artifactId>
<version>{version}</version>
<scope>provided</scope>
</dependency>🎊 Gradle dependency
dependencies {
implementation 'com.github.Yuhtin:animations:{version}'
}First, you need to put the main plugin on the server (you can find the jar in the versions of this project)
You need to extend the Animation class and use the AnimationHandler annotation in the class
@AnimationHandler(
name = "test",
description = "Test",
state = AnimationHandler.AnimationVersion.RELEASE
)
publicclassTestAextendsAnimation {
@Overridepublicvoidexecute(Playerplayer) {
runnableID = newBukkitRunnable() {
@Overridepublicvoidrun() {
// make something
}
}.getTaskId();
ArmorStandstand = player.getLocation().getWorld().spawn(player.getLocation(), ArmorStand.class);
hologramList.add(stand);
}
@Overridepublicvoidstop() {
hologramList.forEach(ArmorStand::remove);
Bukkit.getScheduler().cancelTask(runnableID);
}
}To register the animation, use the function AnimationRegistry#registry
publicfinalclassAnimationTestextendsJavaPlugin {
@OverridepublicvoidonEnable() {
// Plugin startup logicAnimationRegistry.registry(this.getName(), TestA.class);
}
@OverridepublicvoidonDisable() {
// Plugin shutdown logic
}
}Use the command /animation in game
You need to put this information in your plugin.yml
softdepend: [ Animations ]