mirror of
https://github.com/MCCTeam/Minecraft-Console-Client
synced 2025-10-14 21:22:49 +00:00
Added clientID to login call.
Updated project file to include Cache namespace.
This commit is contained in:
parent
64606c128f
commit
75f2f738a2
2 changed files with 7 additions and 5 deletions
|
|
@ -72,6 +72,7 @@
|
||||||
</ItemGroup>
|
</ItemGroup>
|
||||||
<ItemGroup>
|
<ItemGroup>
|
||||||
<Compile Include="AutoTimeout.cs" />
|
<Compile Include="AutoTimeout.cs" />
|
||||||
|
<Compile Include="Cache\AuthCacheHandler.cs" />
|
||||||
<Compile Include="ChatBots\Alerts.cs" />
|
<Compile Include="ChatBots\Alerts.cs" />
|
||||||
<Compile Include="ChatBots\AntiAFK.cs" />
|
<Compile Include="ChatBots\AntiAFK.cs" />
|
||||||
<Compile Include="ChatBots\AutoRespond.cs" />
|
<Compile Include="ChatBots\AutoRespond.cs" />
|
||||||
|
|
|
||||||
|
|
@ -118,6 +118,7 @@ namespace MinecraftClient
|
||||||
ProtocolHandler.LoginResult result;
|
ProtocolHandler.LoginResult result;
|
||||||
Settings.Username = Settings.Login;
|
Settings.Username = Settings.Login;
|
||||||
string sessionID = "";
|
string sessionID = "";
|
||||||
|
string clientID = "";
|
||||||
string UUID = "";
|
string UUID = "";
|
||||||
|
|
||||||
if (Settings.Password == "-")
|
if (Settings.Password == "-")
|
||||||
|
|
@ -129,21 +130,21 @@ namespace MinecraftClient
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
Console.WriteLine("Connecting to Minecraft.net...");
|
Console.WriteLine("Connecting to Minecraft.net...");
|
||||||
result = ProtocolHandler.GetLogin(ref Settings.Username, Settings.Password, ref sessionID, ref UUID);
|
result = ProtocolHandler.GetLogin(ref Settings.Username, Settings.Password, ref sessionID, ref clientID, ref UUID);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (result == ProtocolHandler.LoginResult.Success)
|
if (result == ProtocolHandler.LoginResult.Success)
|
||||||
{
|
{
|
||||||
if (Settings.ConsoleTitle != "")
|
if (Settings.ConsoleTitle != "")
|
||||||
Console.Title = Settings.ExpandVars(Settings.ConsoleTitle);
|
Console.Title = Settings.ExpandVars(Settings.ConsoleTitle);
|
||||||
|
|
||||||
if (Settings.playerHeadAsIcon)
|
if (Settings.playerHeadAsIcon)
|
||||||
ConsoleIcon.setPlayerIconAsync(Settings.Username);
|
ConsoleIcon.setPlayerIconAsync(Settings.Username);
|
||||||
|
|
||||||
Console.WriteLine("Success. (session ID: " + sessionID + ')');
|
Console.WriteLine("Success. (session ID: " + sessionID + ')');
|
||||||
|
|
||||||
//ProtocolHandler.RealmsListWorlds(Settings.Username, UUID, sessionID); //TODO REMOVE
|
//ProtocolHandler.RealmsListWorlds(Settings.Username, UUID, sessionID); //TODO REMOVE
|
||||||
|
|
||||||
if (Settings.ServerIP == "")
|
if (Settings.ServerIP == "")
|
||||||
{
|
{
|
||||||
Console.Write("Server IP : ");
|
Console.Write("Server IP : ");
|
||||||
|
|
@ -267,7 +268,7 @@ namespace MinecraftClient
|
||||||
/// <param name="errorMessage">Error message to display and optionally pass to AutoRelog bot</param>
|
/// <param name="errorMessage">Error message to display and optionally pass to AutoRelog bot</param>
|
||||||
/// <param name="versionError">Specify if the error is related to an incompatible or unkown server version</param>
|
/// <param name="versionError">Specify if the error is related to an incompatible or unkown server version</param>
|
||||||
/// <param name="disconnectReason">If set, the error message will be processed by the AutoRelog bot</param>
|
/// <param name="disconnectReason">If set, the error message will be processed by the AutoRelog bot</param>
|
||||||
|
|
||||||
public static void HandleFailure(string errorMessage = null, bool versionError = false, ChatBots.AutoRelog.DisconnectReason? disconnectReason = null)
|
public static void HandleFailure(string errorMessage = null, bool versionError = false, ChatBots.AutoRelog.DisconnectReason? disconnectReason = null)
|
||||||
{
|
{
|
||||||
if (!String.IsNullOrEmpty(errorMessage))
|
if (!String.IsNullOrEmpty(errorMessage))
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue