コード例 #1
0
ファイル: StatusControl.cs プロジェクト: mctraveler/MineSharp
 void PardonPlayer(object sender, EventArgs e)
 {
     foreach (PlayerListItem i in SelectedItems)
     {
         ProxyControl.Pardon(i.Item.Username);
     }
 }
コード例 #2
0
        void HandleTpPlayerClick(object sender, EventArgs e)
        {
            var c = Map.Position.Clone();

            c.Y = 100;
            ProxyControl.Tp("Player", c, Map.Dimension);
        }
コード例 #3
0
        void HandlePardonClick(object sender, EventArgs e)
        {
            string u = TextInput.GetInput(this, "Who");

            if (u == null)
            {
                return;
            }
            ProxyControl.Pardon(u);
        }
コード例 #4
0
        protected override void OnShown(EventArgs e)
        {
            base.OnShown(e);
            ProxyControl.Update += PlayersUpdated;

#if DEBUG
            ProxyControl.Connect(25465);
            ServerCommander.Startup();
#else
            ProxyControl.Connect(25465);
            ServerCommander.Startup();
#endif
        }
コード例 #5
0
        void HandleBanClick(object sender, EventArgs e)
        {
            string u = TextInput.GetInput(this, "Who");

            if (u == null)
            {
                return;
            }
            string w = TextInput.GetInput(this, "Why");

            if (w == null)
            {
                return;
            }
            ProxyControl.Ban(u, DateTime.MaxValue, w);
        }
コード例 #6
0
ファイル: StatusControl.cs プロジェクト: mctraveler/MineSharp
        void KickPlayer(object sender, EventArgs e)
        {
            string players = "";

            foreach (PlayerListItem i in SelectedItems)
            {
                players += " " + i.Item.Username;
            }

            string reason = TextInput.GetInput(this, "Why Kick" + players);

            if (reason == null)
            {
                return;
            }

            foreach (PlayerListItem i in SelectedItems)
            {
                ProxyControl.Kick(i.Item, reason);
            }
        }
コード例 #7
0
ファイル: StatusControl.cs プロジェクト: mctraveler/MineSharp
        void BanPlayer30(object sender, EventArgs e)
        {
            string players = "";

            foreach (PlayerListItem i in SelectedItems)
            {
                players += " " + i.Item.Username;
            }

            string reason = TextInput.GetInput(this, "Why Ban" + players);

            if (reason == null)
            {
                return;
            }

            foreach (PlayerListItem i in SelectedItems)
            {
                ProxyControl.Ban(i.Item, DateTime.Now.AddMinutes(30), reason);
            }
        }
コード例 #8
0
 protected override void OnClosing(System.ComponentModel.CancelEventArgs e)
 {
     ProxyControl.Stop();
     base.OnClosing(e);
 }