Ejemplo n.º 1
0
        /// <summary>
        /// Disconnects from the minecraft server (if connected) and resets the client's variables.
        /// </summary>
        public void Disconnect()
        {
            Nm.Disconnect();

            Location = new Vector3S();
            Position = new byte[2];

            Entities.Clear();
            ClientWorld = null;
        }
Ejemplo n.º 2
0
 /// <summary>
 /// Creates a new MinecraftClient, and initilizes all the required variables.
 /// </summary>
 /// <param name="cpe"></param>
 /// <param name="un"></param>
 /// <param name="pw"></param>
 /// <param name="verifyName"></param>
 public Bot(bool cpe, string un="Bot", string pw="Bot", bool verifyName=true)
 {
     Username = un;
     Password = pw;
     EnableCpe = cpe;
     Location = new Vector3S();
     Position = new byte[2];
     ClientSupportedExtensions = new List<CPEExtensions>();
     ExtPlayerList = new Dictionary<string, ExtPlayerListEntry>(StringComparer.InvariantCultureIgnoreCase);
     NumberPlayerList = new Dictionary<short, ExtPlayerListEntry>();
     VerifyNames = verifyName;
 }