package lnmpro;

import org.bukkit.plugin.java.JavaPlugin;
import lnmpro.Commands.*;
import lnmpro.Listeners.*;

public final class Main extends JavaPlugin {

    private static Main instance;

    @Override
    public void onEnable() {
        getConfig().options().copyDefaults(true);
        saveDefaultConfig();
        saveConfig();

        getCommand("duel").setExecutor(new DuelsCommand(this));
        getCommand("acceptduel").setExecutor(new AcceptDuelCommand(this));
        getCommand("denyduel").setExecutor(new DenyDuelCommand(this));

        getServer().getPluginManager().registerEvents(new DuelRequestListener(this), this);
        getServer().getPluginManager().registerEvents(new KitListener(this), this);

        instance = this;
    }

    public static Main getInstance() {
        return instance;
    }
}