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
)
public class TestA extends Animation {
@Override
public void execute(Player player) {
runnableID = new BukkitRunnable() {
@Override
public void run() {
// make something
}
}.getTaskId();
ArmorStand stand = player.getLocation().getWorld().spawn(player.getLocation(), ArmorStand.class);
hologramList.add(stand);
}
@Override
public void stop() {
hologramList.forEach(ArmorStand::remove);
Bukkit.getScheduler().cancelTask(runnableID);
}
}
To register the animation, use the function AnimationRegistry#registry
public final class AnimationTest extends JavaPlugin {
@Override
public void onEnable() {
// Plugin startup logic
AnimationRegistry.registry(this.getName(), TestA.class);
}
@Override
public void onDisable() {
// Plugin shutdown logic
}
}
Use the command /animation in game
You need to put this information in your plugin.yml
softdepend: [ Animations ]