mirror of
https://github.com/MCCTeam/Minecraft-Console-Client
synced 2025-11-07 17:36:07 +00:00
Online Mode done, 1.7 compatibility should be OK
+ Fixed chat colors because of 1.7 changes + Some code cleanup here and there
This commit is contained in:
parent
0d0a7e9c4a
commit
30cbc85850
5 changed files with 42 additions and 105 deletions
|
|
@ -34,9 +34,9 @@ namespace MinecraftClient
|
|||
/// <param name="sessionID">A valid sessionID obtained with MinecraftCom.GetLogin()</param>
|
||||
/// <param name="server_port">The server IP (serveradress or serveradress:port)</param>
|
||||
|
||||
public McTcpClient(string username, string sessionID, string server_port, MinecraftCom handler)
|
||||
public McTcpClient(string username, string uuid, string sessionID, string server_port, MinecraftCom handler)
|
||||
{
|
||||
StartClient(username, sessionID, server_port, false, handler, "");
|
||||
StartClient(username, uuid, sessionID, server_port, false, handler, "");
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
|
|
@ -47,9 +47,9 @@ namespace MinecraftClient
|
|||
/// <param name="server_port">The server IP (serveradress or serveradress:port)</param>
|
||||
/// <param name="command">The text or command to send.</param>
|
||||
|
||||
public McTcpClient(string username, string sessionID, string server_port, MinecraftCom handler, string command)
|
||||
public McTcpClient(string username, string uuid, string sessionID, string server_port, MinecraftCom handler, string command)
|
||||
{
|
||||
StartClient(username, sessionID, server_port, true, handler, command);
|
||||
StartClient(username, uuid, sessionID, server_port, true, handler, command);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
|
|
@ -61,7 +61,7 @@ namespace MinecraftClient
|
|||
/// <param name="singlecommand">If set to true, the client will send a single command and then disconnect from the server</param>
|
||||
/// <param name="command">The text or command to send. Will only be sent if singlecommand is set to true.</param>
|
||||
|
||||
private void StartClient(string user, string sessionID, string server_port, bool singlecommand, MinecraftCom handler, string command)
|
||||
private void StartClient(string user, string uuid, string sessionID, string server_port, bool singlecommand, MinecraftCom handler, string command)
|
||||
{
|
||||
this.handler = handler;
|
||||
username = user;
|
||||
|
|
@ -86,7 +86,7 @@ namespace MinecraftClient
|
|||
client = new TcpClient(host, port);
|
||||
client.ReceiveBufferSize = 1024 * 1024;
|
||||
handler.setClient(client);
|
||||
if (handler.Login(user, sessionID, host, port))
|
||||
if (handler.Login(user, uuid, sessionID, host, port))
|
||||
{
|
||||
//Single command sending
|
||||
if (singlecommand)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue