No chat to show

This project's files are all here to explore.

Files
src
INSTALLATION.md
pom.xml
PROJECT_SUMMARY.md
README.md
Code
18 2,636
src/main/java/com/atheronsmp/visualtag/VisualTag.java
package com.atheronsmp.visualtag;

import com.atheronsmp.visualtag.commands.VisualCommand;
import com.atheronsmp.visualtag.listeners.CombatListener;
import com.atheronsmp.visualtag.listeners.ItemBlockListener;
import com.atheronsmp.visualtag.listeners.PlayerListener;
import com.atheronsmp.visualtag.managers.CombatManager;
import com.atheronsmp.visualtag.managers.ConfigManager;
import com.atheronsmp.visualtag.managers.DetectionManager;
import com.atheronsmp.visualtag.managers.PunishmentManager;
import org.bukkit.Bukkit;
import org.bukkit.plugin.java.JavaPlugin;

public class VisualTag extends JavaPlugin {

    private static VisualTag instance;
    private ConfigManager configManager;
    private CombatManager combatManager;
    private PunishmentManager punishmentManager;
    private DetectionManager detectionManager;

    @Override
    public void onEnable() {
        instance = this;

        // Initialize managers
        this.configManager = new ConfigManager(this);
        this.combatManager = new CombatManager(this);
        this.punishmentManager = new PunishmentManager(this);
        this.detectionManager = new DetectionManager(this);

        // Register commands
        getCommand("visual").setExecutor(new VisualCommand(this));

        // Register listeners
        Bukkit.getPluginManager().registerEvents(new CombatListener(this), this);
        Bukkit.getPluginManager().registerEvents(new PlayerListener(this), this);
        Bukkit.getPluginManager().registerEvents(new ItemBlockListener(this), this);

        // Start detection system
        detectionManager.startDetection();

        getLogger().info("VisualTag v" + getDescription().getVersion() + " enabled!");
        getLogger().info("Anti-combat-logging system active.");
    }

    @Override
    public void onDisable() {
        // Stop detection
        if (detectionManager != null) {
            detectionManager.stopDetection();
        }

        // Clear all combat states
        if (combatManager != null) {
            combatManager.cleanup();
        }

        // Clear all punishments
        if (punishmentManager != null) {
            punishmentManager.cleanup();
        }

        getLogger().info("VisualTag disabled.");
    }

    public static VisualTag getInstance() {
        return instance;
    }

    public ConfigManager getConfigManager() {
        return configManager;
    }

    public CombatManager getCombatManager() {
        return combatManager;
    }

    public PunishmentManager getPunishmentManager() {
        return punishmentManager;
    }

    public DetectionManager getDetectionManager() {
        return detectionManager;
    }
}