Files
src
build.gradle
Code
25 1,781
src/main/java/com/autoeventpro/AutoEventPro.java
package com.autoeventpro;
import com.autoeventpro.anticheat.AntiCheatManager;
import com.autoeventpro.arena.ArenaManager;
import com.autoeventpro.commands.EventCommand;
import com.autoeventpro.config.ConfigManager;
import com.autoeventpro.event.EventManager;
import com.autoeventpro.listeners.PlayerListener;
import com.autoeventpro.placeholders.EventPlaceholders;
import com.autoeventpro.protection.ProtectionManager;
import lombok.Getter;
import org.bukkit.Bukkit;
import org.bukkit.plugin.java.JavaPlugin;
@Getter
public class AutoEventPro extends JavaPlugin {
private ConfigManager configManager;
private ArenaManager arenaManager;
private EventManager eventManager;
private ProtectionManager protectionManager;
private AntiCheatManager antiCheatManager;
@Override
public void onEnable() {
this.configManager = new ConfigManager(this);
this.configManager.loadConfigs();
this.arenaManager = new ArenaManager(this);
this.protectionManager = new ProtectionManager(this);
this.antiCheatManager = new AntiCheatManager(this);
this.eventManager = new EventManager(this);
new EventCommand(this);
Bukkit.getPluginManager().registerEvents(new PlayerListener(this), this);
if (Bukkit.getPluginManager().getPlugin("PlaceholderAPI") != null) {
new EventPlaceholders(this).register();
getLogger().info("PlaceholderAPI hooked successfully!");
}
getLogger().info("AutoEventPro has been enabled!");
}
@Override
public void onDisable() {
if (eventManager != null && eventManager.isEventActive()) {
eventManager.forceEndEvent();
}
getLogger().info("AutoEventPro has been disabled!");
}
}