Files
src
build.gradle
pom.xml
Code
21 1,713
src/main/java/com/frostyac/FrostyAC.java
package dev.frosty.anticheat;
import dev.frosty.anticheat.commands.FrostyCommand;
import dev.frosty.anticheat.listeners.*;
import dev.frosty.anticheat.managers.ConfigManager;
import dev.frosty.anticheat.managers.DiscordWebhookManager;
import dev.frosty.anticheat.managers.ViolationManager;
import lombok.Getter;
import org.bukkit.plugin.java.JavaPlugin;
@Getter
public class FrostyAC extends JavaPlugin {
private ConfigManager configManager;
private ViolationManager violationManager;
private DiscordWebhookManager discordWebhookManager;
@Override
public void onEnable() {
this.configManager = new ConfigManager(this);
this.discordWebhookManager = new DiscordWebhookManager(this);
this.violationManager = new ViolationManager(this);
registerListeners();
registerCommands();
getLogger().info("FrostyAC has been enabled!");
}
@Override
public void onDisable() {
violationManager.cleanup();
getLogger().info("FrostyAC has been disabled!");
}
private void registerListeners() {
getServer().getPluginManager().registerEvents(new FlyCheckListener(this), this);
getServer().getPluginManager().registerEvents(new ReachCheckListener(this), this);
getServer().getPluginManager().registerEvents(new SpeedCheckListener(this), this);
getServer().getPluginManager().registerEvents(new XRayCheckListener(this), this);
getServer().getPluginManager().registerEvents(new KillAuraCheckListener(this), this);
getServer().getPluginManager().registerEvents(new NoFallCheckListener(this), this);
getServer().getPluginManager().registerEvents(new AutoClickerCheckListener(this), this);
getServer().getPluginManager().registerEvents(new ScaffoldCheckListener(this), this);
getServer().getPluginManager().registerEvents(new VelocityCheckListener(this), this);
getServer().getPluginManager().registerEvents(new CriticalsCheckListener(this), this);
getServer().getPluginManager().registerEvents(new AutoTotemCheckListener(this), this);
}
private void registerCommands() {
getCommand("frostyac").setExecutor(new FrostyCommand(this));
}
}