Files
src
build.gradle
Code
9 620
src/main/java/com/crystalpowers/CrystalPowers.java
package com.crystalpowers;
import com.crystalpowers.command.CrystalCommand;
import com.crystalpowers.crystal.CrystalManager;
import com.crystalpowers.listener.CrystalSkillListener;
import com.crystalpowers.recipe.CrystalRecipe;
import com.crystalpowers.task.CrystalEffectTask;
import lombok.Getter;
import org.bukkit.Bukkit;
import org.bukkit.plugin.java.JavaPlugin;
@Getter
public class CrystalPowers extends JavaPlugin {
private CrystalManager crystalManager;
private CrystalEffectTask effectTask;
@Override
public void onEnable() {
this.crystalManager = new CrystalManager(this);
Bukkit.getPluginManager().registerEvents(new CrystalSkillListener(this), this);
this.getCommand("crystals").setExecutor(new CrystalCommand(this));
CrystalRecipe.registerRecipes(this);
this.effectTask = new CrystalEffectTask(this);
this.effectTask.runTaskTimer(this, 40L, 40L);
getLogger().info("CrystalPowers has been enabled!");
}
@Override
public void onDisable() {
if (this.effectTask != null) {
this.effectTask.cancel();
}
getLogger().info("CrystalPowers has been disabled!");
}
}