Files
src
Code
6 553
src/main/java/com/kodari/bountysystem/BountyPlugin.java
package com.kodari.bountysystem;
import lombok.Getter;
import org.bukkit.plugin.java.JavaPlugin;
public class BountyPlugin extends JavaPlugin {
@Getter private BountyManager bountyManager;
@Override
public void onEnable() {
saveDefaultConfig();
bountyManager = new BountyManager(this);
bountyManager.load();
bountyManager.startHologramTask();
getServer().getPluginManager().registerEvents(new BountyListener(this), this);
BountyCommand cmd = new BountyCommand(this);
getCommand("bounty").setExecutor(cmd);
getCommand("bounty").setTabCompleter(cmd);
getLogger().info("BountySystem enabled.");
}
@Override
public void onDisable() {
bountyManager.save();
bountyManager.removeAllHolograms();
getLogger().info("BountySystem disabled.");
}
}