Files
src
build.gradle
Code
32 1,762
src/main/java/com/corruptedsmp/CorruptedSMP.java
package com.corruptedsmp;
import com.corruptedsmp.command.*;
import com.corruptedsmp.inventory.gui.GUIListener;
import com.corruptedsmp.inventory.gui.GUIManager;
import com.corruptedsmp.listener.PlayerJoinListener;
import com.corruptedsmp.listener.PlayerKillListener;
import com.corruptedsmp.manager.*;
import lombok.Getter;
import org.bukkit.plugin.java.JavaPlugin;
@Getter
public class CorruptedSMP extends JavaPlugin {
private ConfigManager configManager;
private DataManager dataManager;
private WattsManager wattsManager;
private CooldownManager cooldownManager;
private CorruptionManager corruptionManager;
private TrustManager trustManager;
private GUIManager guiManager;
@Override
public void onEnable() {
saveDefaultConfig();
configManager = new ConfigManager(this);
dataManager = new DataManager(this);
cooldownManager = new CooldownManager();
wattsManager = new WattsManager(this);
corruptionManager = new CorruptionManager(this);
trustManager = new TrustManager(this);
guiManager = new GUIManager();
getServer().getPluginManager().registerEvents(new GUIListener(guiManager), this);
getServer().getPluginManager().registerEvents(new PlayerJoinListener(this), this);
getServer().getPluginManager().registerEvents(new PlayerKillListener(this), this);
CorruptionsCommand corruptionsCmd = new CorruptionsCommand(this);
getCommand("corruptions").setExecutor(corruptionsCmd);
getCommand("corruptions").setTabCompleter(corruptionsCmd);
Ability1Command ability1Cmd = new Ability1Command(this);
getCommand("ability1").setExecutor(ability1Cmd);
WattsCommand wattsCmd = new WattsCommand(this);
getCommand("watts").setExecutor(wattsCmd);
getCommand("watts").setTabCompleter(wattsCmd);
CooldownsCommand cooldownsCmd = new CooldownsCommand(this);
getCommand("cooldowns").setExecutor(cooldownsCmd);
TrustCommand trustCmd = new TrustCommand(this);
getCommand("trust").setExecutor(trustCmd);
getCommand("trust").setTabCompleter(trustCmd);
getCommand("untrust").setExecutor(trustCmd);
getCommand("untrust").setTabCompleter(trustCmd);
CorruptedCommand corruptedCmd = new CorruptedCommand(this);
getCommand("corrupted").setExecutor(corruptedCmd);
getCommand("corrupted").setTabCompleter(corruptedCmd);
getLogger().info("CorruptedSMP enabled successfully.");
}
@Override
public void onDisable() {
getLogger().info("CorruptedSMP disabled.");
}
}