package org.cn2b2t.proxy.managers;

import org.cn2b2t.proxy.Main;
import net.md_5.bungee.api.config.ServerInfo;

import java.util.Map;

public class ServersManager {

    public static void updateServersIntoDatabase() {
//        DataManager.getTempConnection().SQLqueryWithNoResult("truncate table `serverlist`");
//        for (Map.Entry<String, ServerInfo> entry : Main.getInstance().getProxy().getServers().entrySet()) {
//            String name = entry.getKey();
//            int port = entry.getValue().getAddress().getPort();
//
//            DataManager.getTempConnection().SQLqueryWithNoResult("INSERT IGNORE INTO `serverlist`(`server`, `port`) VALUES ('" + name + "','" + port + "')");
//        }
    }

}
