public static void Login(string username, string password, string server) { Client = Connect(username, password, server); Client.Player.Location.Y -= 0.5; Client.Player.Rotation.Y = 0; Recenter_Location(); }
/// <summary> /// Writes the packet. /// </summary> /// <param name="Client">The client.</param> /// <remarks></remarks> public override void WritePacket(MultiplayerClient Client) { throw new InvalidOperationException(); }
/// <summary> /// Reads the packet. /// </summary> /// <param name="Client">The client.</param> /// <remarks></remarks> public override void ReadPacket(MultiplayerClient Client) { throw new NotImplementedException(); }
/// <summary> /// Writes the packet. /// </summary> /// <param name="Client">The client.</param> /// <remarks></remarks> public abstract void WritePacket(MultiplayerClient Client);
/// <summary> /// Reads the packet. /// </summary> /// <param name="Client">The client.</param> /// <remarks></remarks> public abstract void ReadPacket(MultiplayerClient Client);
/// <summary> /// Handles the packet. /// </summary> /// <param name="Client">The client.</param> /// <remarks></remarks> public abstract void HandlePacket(MultiplayerClient Client);
private static MultiplayerClient Connect(string username, string password, string server) { p.UserName = username; p.Password = password; MultiplayerClient mpc = new MultiplayerClient(); MinecraftServer mcs = new MinecraftServer(); mcs.Hostname = server; mpc.Connect(mcs); mpc.LogIn(p); Server = mcs; return mpc; }
/// <summary> /// Handles the packet. /// </summary> /// <param name="Client">The client.</param> /// <remarks></remarks> public override void HandlePacket(MultiplayerClient Client) { throw new InvalidOperationException(); // TODO }
/// <summary> /// Handles the packet. /// </summary> /// <param name="Client">The client.</param> /// <remarks></remarks> public override void HandlePacket(MultiplayerClient Client) { throw new InvalidOperationException(); // TODO: When MultiplayerClient is changed to a Queue system, handle all of these }