No chat to show

This project's files are all here to explore.

Files
src
build.gradle
Code
18 1,195
src/main/java/com/niloy/luckyblockvoteevent/AuLuckyBlockParty.java
package com.niloy.luckyblockvoteevent;

import com.niloy.luckyblockvoteevent.command.LvpCommand;
import com.niloy.luckyblockvoteevent.listener.BlockInteractListener;
import com.niloy.luckyblockvoteevent.listener.VoteListener;
import lombok.Getter;
import org.bukkit.Bukkit;
import org.bukkit.plugin.java.JavaPlugin;

@Getter
public class AuLuckyBlockParty extends JavaPlugin {

    private ConfigManager configManager;
    private DataManager dataManager;
    private VoteManager voteManager;
    private BlockManager blockManager;
    private RewardManager rewardManager;

    @Override
    public void onEnable() {
        configManager = new ConfigManager(this);
        dataManager = new DataManager(this);
        voteManager = new VoteManager(this);
        blockManager = new BlockManager(this);
        rewardManager = new RewardManager(this);

        getCommand("lvp").setExecutor(new LvpCommand(this));
        getCommand("lvp").setTabCompleter(new LvpCommand(this));

        Bukkit.getPluginManager().registerEvents(new BlockInteractListener(this), this);

        if (Bukkit.getPluginManager().getPlugin("Votifier") != null) {
            Bukkit.getPluginManager().registerEvents(new VoteListener(this), this);
            getLogger().info("Votifier hooked successfully.");
        }

        if (Bukkit.getPluginManager().getPlugin("PlaceholderAPI") != null) {
            new LuckyBlockPlaceholder(this).register();
            getLogger().info("PlaceholderAPI hooked successfully.");
        }

        getLogger().info("AuLuckyBlockParty enabled!");
    }

    @Override
    public void onDisable() {
        if (voteManager != null && voteManager.isEventActive()) {
            blockManager.deactivateBlock();
        }
        dataManager.save();
        getLogger().info("AuLuckyBlockParty disabled.");
    }
}