Files
src
build.gradle
Code
7 430
src/main/java/com/godarmour/GodArmour.java
package com.godarmour;
import com.godarmour.commands.GodArmourCommand;
import com.godarmour.managers.ArmourManager;
import com.godarmour.tasks.TrimAnimationTask;
import lombok.Getter;
import org.bukkit.Bukkit;
import org.bukkit.plugin.java.JavaPlugin;
@Getter
public class GodArmour extends JavaPlugin {
private ArmourManager armourManager;
private TrimAnimationTask trimAnimationTask;
@Override
public void onEnable() {
saveDefaultConfig();
this.armourManager = new ArmourManager(this);
getCommand("godarmour").setExecutor(new GodArmourCommand(this));
this.trimAnimationTask = new TrimAnimationTask(this);
int speed = getConfig().getInt("animation-speed", 20);
trimAnimationTask.runTaskTimer(this, 0L, speed);
getLogger().info("GodArmour has been enabled!");
getLogger().info("Trim animation running at " + speed + " tick intervals");
}
@Override
public void onDisable() {
if (trimAnimationTask != null) {
trimAnimationTask.cancel();
}
getLogger().info("GodArmour has been disabled!");
}
}