Files
src
build.gradle
Code
8 458
src/main/java/com/kodari/chatgames/ChatGamesPlugin.java
package com.kodari.chatgames;
import org.bukkit.plugin.java.JavaPlugin;
public final class ChatGamesPlugin extends JavaPlugin {
private ChatGameManager gameManager;
@Override
public void onEnable() {
saveDefaultConfig();
gameManager = new ChatGameManager(this);
ChatGamesCommand command = new ChatGamesCommand(this, gameManager);
getCommand("chatgames").setExecutor(command);
getCommand("chatgames").setTabCompleter(command);
getServer().getPluginManager().registerEvents(new ChatListener(gameManager), this);
gameManager.startAutomaticGames();
}
@Override
public void onDisable() {
if (gameManager != null) {
gameManager.shutdown();
}
}
}