コード例 #1
0
ファイル: MainForm.cs プロジェクト: BGCX261/zma-svn-to-git
        public MainForm()
        {
            InitializeComponent();
            mc = new MinecraftHandler("rules.txt", "kits.xml", "banned-players.txt", "player.txt", "admins.txt", "MineCraftAdmin.cfg");
            Tunnel = new TcpTunnelServer(mc);
            mc.ServerStarted += new EventHandler(mc_ServerStarted);
            mc.ServerStopped += new EventHandler(mc_ServerStopped);

            mc.PlayerJoined += new MinecraftHandler.OnPlayerjoined(mc_PlayerJoined);
            mc.PlayerLeft += new MinecraftHandler.OnPlayerLeft(mc_PlayerLeft);

            mc.OutputDataReceived += new MinecraftHandler.OnOutputDataReceived(mc_OutputDataReceived);
            mc.ServerExited += new MinecraftHandler.OnServerExited(mc_ServerExited);
            LoadModules();
            ReadFromConfig();
            //CheckIfRestartOrBackup();
            this.Text = "Zicore's Minecraft Admintool - © 2010-2011 - v" + Application.ProductVersion;
            mc.Version = Application.ProductVersion;
            restart = new Restart(mc);

            this.listLoadedPlugins.DataSource = mc.Plugins;
            //mc.SaveCompleted += new MinecraftHandler.OnSaveCompletedDelegate(mc_SaveCompleted);
            web = new WebHandler(mc, Tunnel);
            web.Start();
            GenerateTaskColumns();
        }
コード例 #2
0
        public ServerSocket(TcpTunnelServer tunnel)
        {
            this.Tunnel = tunnel;

            Tunnel.MinecraftHandler.PlayerKicked += new MinecraftHandler.OnPlayerKicked(MinecraftHandler_PlayerKicked);
            Tunnel.MinecraftHandler.TimerCommandReader.Tick += new EventHandler(TimerCommandReader_Tick);
            Tunnel.MinecraftHandler.ExecuteMODT += new MinecraftHandler.OnExecuteMODT(MinecraftHandler_ExecuteMODT);
            Tunnel.MinecraftHandler.PlayerJoined += new MinecraftHandler.OnPlayerjoined(MinecraftHandler_PlayerJoined);

            Channels.AddChannel(defaultChannel);
        }
コード例 #3
0
        public ServerSocket(TcpTunnelServer tunnel)
        {
            this.Tunnel = tunnel;

            Tunnel.MinecraftHandler.PlayerKicked            += new MinecraftHandler.OnPlayerKicked(MinecraftHandler_PlayerKicked);
            Tunnel.MinecraftHandler.TimerCommandReader.Tick += new EventHandler(TimerCommandReader_Tick);
            Tunnel.MinecraftHandler.ExecuteMODT             += new MinecraftHandler.OnExecuteMODT(MinecraftHandler_ExecuteMODT);
            Tunnel.MinecraftHandler.PlayerJoined            += new MinecraftHandler.OnPlayerjoined(MinecraftHandler_PlayerJoined);

            Channels.AddChannel(defaultChannel);
        }
コード例 #4
0
ファイル: WebHandler.cs プロジェクト: BGCX261/zma-svn-to-git
        public WebHandler(MinecraftHandler mc, TcpTunnelServer tunnel)
        {
            this.tunnel = tunnel;
            this.mc = mc;
            string host = mc.Config.DatabaseHost;
            string user = mc.Config.DatabaseUser;
            string pass = mc.Config.DatabasePassword;
            string database = mc.Config.Database;
            int port = mc.Config.DatabasePort;

            sql = MySQLConnector.GetInstance();
            zma = new ZmaSQLConnection();
        }