Files
src
pom.xml
Code
8 517
src/main/java/com/actualbuca/abchatgames/Abchatgames.java
package com.actualbuca.abchatgames;
import com.actualbuca.abchatgames.config.ConfigManager;
import com.actualbuca.abchatgames.game.GameManager;
import com.actualbuca.abchatgames.game.ChatListener;
import org.bukkit.plugin.java.JavaPlugin;
public class Abchatgames extends JavaPlugin {
private ConfigManager configManager;
private GameManager gameManager;
@Override
public void onEnable() {
saveDefaultConfig();
this.configManager = new ConfigManager(this);
this.gameManager = new GameManager(this, configManager);
getServer().getPluginManager().registerEvents(new ChatListener(gameManager), this);
gameManager.startScheduler();
getLogger().info("Abchatgames has been enabled!");
}
@Override
public void onDisable() {
if (gameManager != null) {
gameManager.shutdown();
}
getLogger().info("Abchatgames has been disabled!");
}
public ConfigManager getConfigManager() {
return configManager;
}
public GameManager getGameManager() {
return gameManager;
}
}