// Path: src/com/cadiducho/minegram/api/exception/TelegramException.java
// public class TelegramException extends Exception {
// 
//     public TelegramException() {
//     }
// 
//     public TelegramException(String message) {
//         super(message);
//     }
// 
//     public TelegramException(String message, Throwable cause) {
//         super(message, cause);
//     }
// 
//     public TelegramException(Throwable cause) {
//         super(cause);
//     }
// 
//     public TelegramException(String message, Throwable cause, boolean enableSuppression, boolean writableStackTrace) {
//         super(message, cause, enableSuppression, writableStackTrace);
//     }
// }


import com.cadiducho.minegram.api.exception.TelegramException;
import java.io.File;
import java.util.ArrayList;
import java.util.HashMap;
import java.util.List;
import java.util.logging.Level;
import org.bukkit.ChatColor;
import org.bukkit.command.Command;
import org.bukkit.command.CommandSender;
import org.bukkit.plugin.Plugin;
import org.bukkit.plugin.java.JavaPlugin;
import org.bukkit.scheduler.BukkitRunnable;
/*
 * The MIT License
 *
 * Copyright 2017 Cadiducho.
 * Read more in https://github.com/Cadiducho/Minegram/blob/master/LICENSE
 */
package com.cadiducho.minegram;


public class MinegramPlugin extends JavaPlugin {

    public static HashMap<BotAPI, Plugin> bots = new HashMap<>();
    public static MinegramPlugin instance;

    @Override
    public void onLoad() {
        log("Minegram loaded. Waiting for bots.");
    }

    @Override
    public void onEnable() {
        instance = this;
        log("Enabling Minegram " + getDescription().getVersion() + " by Cadiducho");

        File config = new File(getDataFolder() + File.separator + "config.yml");
        if (!config.exists()) {
            getConfig().options().copyDefaults(true);
            saveConfig();
        }

        new BukkitRunnable() {
            @Override
            public void run() {
                if (!bots.isEmpty()) {
                    bots.forEach((bot, pluginLoader) -> {
                        try {
                            log("@" + bot.getMe().getUsername() + " loaded by " + pluginLoader.getName());
// Path: src/com/cadiducho/minegram/api/exception/TelegramException.java
// public class TelegramException extends Exception {
// 
//     public TelegramException() {
//     }
// 
//     public TelegramException(String message) {
//         super(message);
//     }
// 
//     public TelegramException(String message, Throwable cause) {
//         super(message, cause);
//     }
// 
//     public TelegramException(Throwable cause) {
//         super(cause);
//     }
// 
//     public TelegramException(String message, Throwable cause, boolean enableSuppression, boolean writableStackTrace) {
//         super(message, cause, enableSuppression, writableStackTrace);
//     }
// }


// Path: src/com/cadiducho/minegram/MinegramPlugin.java
import com.cadiducho.minegram.api.exception.TelegramException;
import java.io.File;
import java.util.ArrayList;
import java.util.HashMap;
import java.util.List;
import java.util.logging.Level;
import org.bukkit.ChatColor;
import org.bukkit.command.Command;
import org.bukkit.command.CommandSender;
import org.bukkit.plugin.Plugin;
import org.bukkit.plugin.java.JavaPlugin;
import org.bukkit.scheduler.BukkitRunnable;

/*
 * The MIT License
 *
 * Copyright 2017 Cadiducho.
 * Read more in https://github.com/Cadiducho/Minegram/blob/master/LICENSE
 */
package com.cadiducho.minegram;


public class MinegramPlugin extends JavaPlugin {

    public static HashMap<BotAPI, Plugin> bots = new HashMap<>();
    public static MinegramPlugin instance;

    @Override
    public void onLoad() {
        log("Minegram loaded. Waiting for bots.");
    }

    @Override
    public void onEnable() {
        instance = this;
        log("Enabling Minegram " + getDescription().getVersion() + " by Cadiducho");

        File config = new File(getDataFolder() + File.separator + "config.yml");
        if (!config.exists()) {
            getConfig().options().copyDefaults(true);
            saveConfig();
        }

        new BukkitRunnable() {
            @Override
            public void run() {
                if (!bots.isEmpty()) {
                    bots.forEach((bot, pluginLoader) -> {
                        try {
                            log("@" + bot.getMe().getUsername() + " loaded by " + pluginLoader.getName());
                        } catch (TelegramException ex) {