public static void CreateClan(Client.GameState client)
        {
            try
            {
                uint clanid = Program.nextClanid;
                Program.nextClanid++;
                client.Entity.Myclan.ClanId = clanid;
                MySqlCommand cmd = new MySqlCommand(MySqlCommandType.INSERT);
                cmd.Insert("Clans").Insert("Name", client.Entity.Myclan.ClanName).Insert("ClanID", clanid)
                    .Insert("Leader", client.Entity.Name).Insert("Fund", 500000).Execute();

                MySqlCommand cmd3 = new MySqlCommand(MySqlCommandType.UPDATE);
                cmd3.Update("entities").Set("ClanId", clanid).Set("ClanRank", "100")
                    .Set("ClanDonation", "500000").Where("UID", client.Entity.UID).Execute();
                client.Entity.ClanRank = 100;
                client.Entity.ClanName = client.Entity.Myclan.ClanName;
                client.Entity.ClanId = clanid;
                Network.GamePackets.Clan cl = new PhoenixProject.Network.GamePackets.Clan(client, 1);
                client.Send(cl.ToArray());
                PhoenixProject.ServerBase.Kernel.ServerClans.Add(clanid, client.Entity.Myclan);
                Network.GamePackets.Clan cls = new PhoenixProject.Network.GamePackets.Clan(client, 1);
                client.Send(cls.ToArray());
            }
            catch (Exception e)
            {
                Program.SaveException(e);
            }
        }
        public static void JoinClan(Client.GameState client)
        {
            MySqlCommand cmd3 = new MySqlCommand(MySqlCommandType.UPDATE);
            cmd3.Update("entities").Set("ClanId", client.Entity.Myclan.ClanId).Set("ClanRank", client.Entity.Myclan.Members[client.Entity.UID].Rank)
                .Set("ClanDonation", client.Entity.Myclan.Members[client.Entity.UID].Donation).Where("UID", client.Entity.UID).Execute();

            Network.GamePackets.Clan cl = new PhoenixProject.Network.GamePackets.Clan(client, 1);
            client.Send(cl.ToArray());
            //Console.WriteLine("111100");
        }