mirror of
https://github.com/MCCTeam/Minecraft-Console-Client
synced 2025-11-07 17:36:07 +00:00
Remove color code from text
This commit is contained in:
parent
2b9c58de56
commit
6c3bfb82ee
12 changed files with 79 additions and 79 deletions
|
|
@ -43,19 +43,19 @@ namespace MinecraftClient.Protocol.Handlers
|
|||
|
||||
if (Handler.GetTerrainEnabled())
|
||||
{
|
||||
ConsoleIO.WriteLineFormatted(Translations.extra_terrainandmovement_disabled, acceptnewlines: true);
|
||||
ConsoleIO.WriteLineFormatted("§c" + Translations.extra_terrainandmovement_disabled, acceptnewlines: true);
|
||||
Handler.SetTerrainEnabled(false);
|
||||
}
|
||||
|
||||
if (handler.GetInventoryEnabled())
|
||||
{
|
||||
ConsoleIO.WriteLineFormatted(Translations.extra_inventory_disabled, acceptnewlines: true);
|
||||
ConsoleIO.WriteLineFormatted("§c" + Translations.extra_inventory_disabled, acceptnewlines: true);
|
||||
handler.SetInventoryEnabled(false);
|
||||
}
|
||||
|
||||
if (handler.GetEntityHandlingEnabled())
|
||||
{
|
||||
ConsoleIO.WriteLineFormatted(Translations.extra_entity_disabled, acceptnewlines: true);
|
||||
ConsoleIO.WriteLineFormatted("§c" + Translations.extra_entity_disabled, acceptnewlines: true);
|
||||
handler.SetEntityHandlingEnabled(false);
|
||||
}
|
||||
}
|
||||
|
|
@ -494,15 +494,15 @@ namespace MinecraftClient.Protocol.Handlers
|
|||
byte[] token = ReadNextByteArray();
|
||||
|
||||
if (serverID == "-")
|
||||
ConsoleIO.WriteLineFormatted(Translations.mcc_server_offline, acceptnewlines: true);
|
||||
ConsoleIO.WriteLineFormatted("§8" + Translations.mcc_server_offline, acceptnewlines: true);
|
||||
else if (Settings.Config.Logging.DebugMessages)
|
||||
ConsoleIO.WriteLineFormatted(string.Format(Translations.mcc_handshake, serverID));
|
||||
ConsoleIO.WriteLineFormatted("§8" + string.Format(Translations.mcc_handshake, serverID));
|
||||
|
||||
return StartEncryption(uuid, username, sessionID, token, serverID, PublicServerkey, session);
|
||||
}
|
||||
else
|
||||
{
|
||||
ConsoleIO.WriteLineFormatted(Translations.error_invalid_response, acceptnewlines: true);
|
||||
ConsoleIO.WriteLineFormatted("§8" + Translations.error_invalid_response, acceptnewlines: true);
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
|
@ -513,7 +513,7 @@ namespace MinecraftClient.Protocol.Handlers
|
|||
byte[] secretKey = CryptoHandler.ClientAESPrivateKey ?? CryptoHandler.GenerateAESPrivateKey();
|
||||
|
||||
if (Settings.Config.Logging.DebugMessages)
|
||||
ConsoleIO.WriteLineFormatted(Translations.debug_crypto, acceptnewlines: true);
|
||||
ConsoleIO.WriteLineFormatted("§8" + Translations.debug_crypto, acceptnewlines: true);
|
||||
|
||||
if (serverIDhash != "-")
|
||||
{
|
||||
|
|
@ -578,7 +578,7 @@ namespace MinecraftClient.Protocol.Handlers
|
|||
}
|
||||
else
|
||||
{
|
||||
ConsoleIO.WriteLineFormatted(Translations.error_invalid_encrypt, acceptnewlines: true);
|
||||
ConsoleIO.WriteLineFormatted("§8" + Translations.error_invalid_encrypt, acceptnewlines: true);
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -107,18 +107,18 @@ namespace MinecraftClient.Protocol.Handlers
|
|||
|
||||
if (handler.GetTerrainEnabled() && protocolVersion > MC_1_19_2_Version)
|
||||
{
|
||||
log.Error(Translations.extra_terrainandmovement_disabled);
|
||||
log.Error("§c" + Translations.extra_terrainandmovement_disabled);
|
||||
handler.SetTerrainEnabled(false);
|
||||
}
|
||||
|
||||
if (handler.GetInventoryEnabled() && (protocolVersion < MC_1_10_Version || protocolVersion > MC_1_19_2_Version))
|
||||
{
|
||||
log.Error(Translations.extra_inventory_disabled);
|
||||
log.Error("§c" + Translations.extra_inventory_disabled);
|
||||
handler.SetInventoryEnabled(false);
|
||||
}
|
||||
if (handler.GetEntityHandlingEnabled() && (protocolVersion < MC_1_10_Version || protocolVersion > MC_1_19_2_Version))
|
||||
{
|
||||
log.Error(Translations.extra_entity_disabled);
|
||||
log.Error("§c" + Translations.extra_entity_disabled);
|
||||
handler.SetEntityHandlingEnabled(false);
|
||||
}
|
||||
|
||||
|
|
@ -1956,12 +1956,12 @@ namespace MinecraftClient.Protocol.Handlers
|
|||
}
|
||||
else if (packetID == 0x02) //Login successful
|
||||
{
|
||||
log.Info(Translations.mcc_server_offline);
|
||||
log.Info("§8" + Translations.mcc_server_offline);
|
||||
login_phase = false;
|
||||
|
||||
if (!pForge.CompleteForgeHandshake())
|
||||
{
|
||||
log.Error(Translations.error_forge);
|
||||
log.Error("§8" + Translations.error_forge);
|
||||
return false;
|
||||
}
|
||||
|
||||
|
|
@ -1981,7 +1981,7 @@ namespace MinecraftClient.Protocol.Handlers
|
|||
RSACryptoServiceProvider RSAService = CryptoHandler.DecodeRSAPublicKey(serverPublicKey)!;
|
||||
byte[] secretKey = CryptoHandler.ClientAESPrivateKey ?? CryptoHandler.GenerateAESPrivateKey();
|
||||
|
||||
log.Debug(Translations.debug_crypto);
|
||||
log.Debug("§8" + Translations.debug_crypto);
|
||||
|
||||
if (serverIDhash != "-")
|
||||
{
|
||||
|
|
@ -2050,7 +2050,7 @@ namespace MinecraftClient.Protocol.Handlers
|
|||
(int packetID, Queue<byte> packetData) = ReadNextPacket();
|
||||
if (packetID < 0 || loopPrevention-- < 0) // Failed to read packet or too many iterations (issue #1150)
|
||||
{
|
||||
handler.OnConnectionLost(ChatBot.DisconnectReason.ConnectionLost, Translations.error_invalid_encrypt);
|
||||
handler.OnConnectionLost(ChatBot.DisconnectReason.ConnectionLost, "§8" + Translations.error_invalid_encrypt);
|
||||
return false;
|
||||
}
|
||||
else if (packetID == 0x00) //Login rejected
|
||||
|
|
@ -2086,7 +2086,7 @@ namespace MinecraftClient.Protocol.Handlers
|
|||
|
||||
if (!pForge.CompleteForgeHandshake())
|
||||
{
|
||||
log.Error(Translations.error_forge_encrypt);
|
||||
log.Error("§8" + Translations.error_forge_encrypt);
|
||||
return false;
|
||||
}
|
||||
|
||||
|
|
@ -2224,7 +2224,7 @@ namespace MinecraftClient.Protocol.Handlers
|
|||
// Check for forge on the server.
|
||||
Protocol18Forge.ServerInfoCheckForge(jsonData, ref forgeInfo);
|
||||
|
||||
ConsoleIO.WriteLineFormatted(string.Format(Translations.mcc_server_protocol, version, protocolVersion + (forgeInfo != null ? Translations.mcc_with_forge : "")));
|
||||
ConsoleIO.WriteLineFormatted("§8" + string.Format(Translations.mcc_server_protocol, version, protocolVersion + (forgeInfo != null ? Translations.mcc_with_forge : "")));
|
||||
|
||||
return true;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -131,7 +131,7 @@ namespace MinecraftClient.Protocol.Handlers
|
|||
byte fmlProtocolVersion = dataTypes.ReadNextByte(packetData);
|
||||
|
||||
if (Settings.Config.Logging.DebugMessages)
|
||||
ConsoleIO.WriteLineFormatted(string.Format(Translations.forge_version, fmlProtocolVersion));
|
||||
ConsoleIO.WriteLineFormatted("§8" + string.Format(Translations.forge_version, fmlProtocolVersion));
|
||||
|
||||
if (fmlProtocolVersion >= 1)
|
||||
currentDimension = dataTypes.ReadNextInt(packetData);
|
||||
|
|
@ -141,7 +141,7 @@ namespace MinecraftClient.Protocol.Handlers
|
|||
|
||||
// Then tell the server that we're running the same mods.
|
||||
if (Settings.Config.Logging.DebugMessages)
|
||||
ConsoleIO.WriteLineFormatted(Translations.forge_send_mod, acceptnewlines: true);
|
||||
ConsoleIO.WriteLineFormatted("§8" + Translations.forge_send_mod, acceptnewlines: true);
|
||||
byte[][] mods = new byte[forgeInfo.Mods.Count][];
|
||||
for (int i = 0; i < forgeInfo.Mods.Count; i++)
|
||||
{
|
||||
|
|
@ -161,7 +161,7 @@ namespace MinecraftClient.Protocol.Handlers
|
|||
Thread.Sleep(2000);
|
||||
|
||||
if (Settings.Config.Logging.DebugMessages)
|
||||
ConsoleIO.WriteLineFormatted(Translations.forge_accept, acceptnewlines: true);
|
||||
ConsoleIO.WriteLineFormatted("§8" + Translations.forge_accept, acceptnewlines: true);
|
||||
// Tell the server that yes, we are OK with the mods it has
|
||||
// even though we don't actually care what mods it has.
|
||||
|
||||
|
|
@ -183,7 +183,7 @@ namespace MinecraftClient.Protocol.Handlers
|
|||
int registrySize = dataTypes.ReadNextVarInt(packetData);
|
||||
|
||||
if (Settings.Config.Logging.DebugMessages)
|
||||
ConsoleIO.WriteLineFormatted(string.Format(Translations.forge_registry, registrySize));
|
||||
ConsoleIO.WriteLineFormatted("§8" + string.Format(Translations.forge_registry, registrySize));
|
||||
|
||||
fmlHandshakeState = FMLHandshakeClientState.PENDINGCOMPLETE;
|
||||
}
|
||||
|
|
@ -195,7 +195,7 @@ namespace MinecraftClient.Protocol.Handlers
|
|||
string registryName = dataTypes.ReadNextString(packetData);
|
||||
int registrySize = dataTypes.ReadNextVarInt(packetData);
|
||||
if (Settings.Config.Logging.DebugMessages)
|
||||
ConsoleIO.WriteLineFormatted(string.Format(Translations.forge_registry_2, registryName, registrySize));
|
||||
ConsoleIO.WriteLineFormatted("§8" + string.Format(Translations.forge_registry_2, registryName, registrySize));
|
||||
if (!hasNextRegistry)
|
||||
fmlHandshakeState = FMLHandshakeClientState.PENDINGCOMPLETE;
|
||||
}
|
||||
|
|
@ -207,7 +207,7 @@ namespace MinecraftClient.Protocol.Handlers
|
|||
if (discriminator != FMLHandshakeDiscriminator.HandshakeAck)
|
||||
return false;
|
||||
if (Settings.Config.Logging.DebugMessages)
|
||||
ConsoleIO.WriteLineFormatted(Translations.forge_accept_registry, acceptnewlines: true);
|
||||
ConsoleIO.WriteLineFormatted("§8" + Translations.forge_accept_registry, acceptnewlines: true);
|
||||
SendForgeHandshakePacket(FMLHandshakeDiscriminator.HandshakeAck,
|
||||
new byte[] { (byte)FMLHandshakeClientState.PENDINGCOMPLETE });
|
||||
fmlHandshakeState = FMLHandshakeClientState.COMPLETE;
|
||||
|
|
@ -301,7 +301,7 @@ namespace MinecraftClient.Protocol.Handlers
|
|||
// [1]: Version is usually set to "FML2" for FML stuff and "1" for mods
|
||||
|
||||
if (Settings.Config.Logging.DebugMessages)
|
||||
ConsoleIO.WriteLineFormatted(Translations.forge_fml2_mod, acceptnewlines: true);
|
||||
ConsoleIO.WriteLineFormatted("§8" + Translations.forge_fml2_mod, acceptnewlines: true);
|
||||
|
||||
List<string> mods = new();
|
||||
int modCount = dataTypes.ReadNextVarInt(packetData);
|
||||
|
|
@ -333,7 +333,7 @@ namespace MinecraftClient.Protocol.Handlers
|
|||
// In MCC, we just want to send a valid response so we'll reply back with data collected from the server.
|
||||
|
||||
if (Settings.Config.Logging.DebugMessages)
|
||||
ConsoleIO.WriteLineFormatted(Translations.forge_fml2_mod_send, acceptnewlines: true);
|
||||
ConsoleIO.WriteLineFormatted("§8" + Translations.forge_fml2_mod_send, acceptnewlines: true);
|
||||
|
||||
// Packet ID 2: Client to Server Mod List
|
||||
fmlResponsePacket.AddRange(dataTypes.GetVarInt(2));
|
||||
|
|
@ -371,7 +371,7 @@ namespace MinecraftClient.Protocol.Handlers
|
|||
if (Settings.Config.Logging.DebugMessages)
|
||||
{
|
||||
string registryName = dataTypes.ReadNextString(packetData);
|
||||
ConsoleIO.WriteLineFormatted(string.Format(Translations.forge_fml2_registry, registryName));
|
||||
ConsoleIO.WriteLineFormatted("§8" + string.Format(Translations.forge_fml2_registry, registryName));
|
||||
}
|
||||
|
||||
fmlResponsePacket.AddRange(dataTypes.GetVarInt(99));
|
||||
|
|
@ -390,7 +390,7 @@ namespace MinecraftClient.Protocol.Handlers
|
|||
if (Settings.Config.Logging.DebugMessages)
|
||||
{
|
||||
string configName = dataTypes.ReadNextString(packetData);
|
||||
ConsoleIO.WriteLineFormatted(string.Format(Translations.forge_fml2_config, configName));
|
||||
ConsoleIO.WriteLineFormatted("§8" + string.Format(Translations.forge_fml2_config, configName));
|
||||
}
|
||||
|
||||
fmlResponsePacket.AddRange(dataTypes.GetVarInt(99));
|
||||
|
|
@ -399,7 +399,7 @@ namespace MinecraftClient.Protocol.Handlers
|
|||
|
||||
default:
|
||||
if (Settings.Config.Logging.DebugMessages)
|
||||
ConsoleIO.WriteLineFormatted(string.Format(Translations.forge_fml2_unknown, packetID));
|
||||
ConsoleIO.WriteLineFormatted("§8" + string.Format(Translations.forge_fml2_unknown, packetID));
|
||||
break;
|
||||
}
|
||||
|
||||
|
|
@ -415,7 +415,7 @@ namespace MinecraftClient.Protocol.Handlers
|
|||
}
|
||||
else if (Settings.Config.Logging.DebugMessages)
|
||||
{
|
||||
ConsoleIO.WriteLineFormatted(string.Format(Translations.forge_fml2_unknown_channel, fmlChannel));
|
||||
ConsoleIO.WriteLineFormatted("§8" + string.Format(Translations.forge_fml2_unknown_channel, fmlChannel));
|
||||
}
|
||||
}
|
||||
return false;
|
||||
|
|
@ -504,10 +504,10 @@ namespace MinecraftClient.Protocol.Handlers
|
|||
forgeInfo = new ForgeInfo(modData, fmlVersion);
|
||||
if (forgeInfo.Mods.Any())
|
||||
{
|
||||
ConsoleIO.WriteLineFormatted(string.Format(Translations.forge_with_mod, forgeInfo.Mods.Count));
|
||||
ConsoleIO.WriteLineFormatted("§8" + string.Format(Translations.forge_with_mod, forgeInfo.Mods.Count));
|
||||
if (Settings.Config.Logging.DebugMessages)
|
||||
{
|
||||
ConsoleIO.WriteLineFormatted(Translations.forge_mod_list, acceptnewlines: true);
|
||||
ConsoleIO.WriteLineFormatted("§8" + Translations.forge_mod_list, acceptnewlines: true);
|
||||
foreach (ForgeInfo.ForgeMod mod in forgeInfo.Mods)
|
||||
ConsoleIO.WriteLineFormatted("§8 " + mod.ToString());
|
||||
}
|
||||
|
|
@ -515,7 +515,7 @@ namespace MinecraftClient.Protocol.Handlers
|
|||
}
|
||||
else
|
||||
{
|
||||
ConsoleIO.WriteLineFormatted(Translations.forge_no_mod, acceptnewlines: true);
|
||||
ConsoleIO.WriteLineFormatted("§8" + Translations.forge_no_mod, acceptnewlines: true);
|
||||
forgeInfo = null;
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -219,7 +219,7 @@ namespace MinecraftClient.Protocol
|
|||
//File not found? Try downloading language file from Mojang's servers?
|
||||
if (!File.Exists(Language_File))
|
||||
{
|
||||
ConsoleIO.WriteLineFormatted(string.Format(Translations.chat_download, Config.Main.Advanced.Language));
|
||||
ConsoleIO.WriteLineFormatted("§8" + string.Format(Translations.chat_download, Config.Main.Advanced.Language));
|
||||
HttpClient httpClient = new();
|
||||
try
|
||||
{
|
||||
|
|
@ -233,7 +233,7 @@ namespace MinecraftClient.Protocol
|
|||
string hash = tmp[1].Split('"')[0]; //Translations file identifier on Mojang's servers
|
||||
string translation_file_location = Settings.TranslationsFile_Website_Download + '/' + hash[..2] + '/' + hash;
|
||||
if (Settings.Config.Logging.DebugMessages)
|
||||
ConsoleIO.WriteLineFormatted(string.Format(Translations.chat_request, translation_file_location));
|
||||
ConsoleIO.WriteLineFormatted("§8" + string.Format(Translations.chat_request, translation_file_location));
|
||||
|
||||
Task<string> fetch_file = httpClient.GetStringAsync(translation_file_location);
|
||||
fetch_file.Wait();
|
||||
|
|
@ -245,11 +245,11 @@ namespace MinecraftClient.Protocol
|
|||
stringBuilder.Append(entry.Key).Append('=').Append(entry.Value.StringValue.Replace("\n", "\\n").Replace("\r", String.Empty)).Append(Environment.NewLine);
|
||||
File.WriteAllText(Language_File, stringBuilder.ToString());
|
||||
|
||||
ConsoleIO.WriteLineFormatted(string.Format(Translations.chat_done, Language_File));
|
||||
ConsoleIO.WriteLineFormatted("§8" + string.Format(Translations.chat_done, Language_File));
|
||||
}
|
||||
catch
|
||||
{
|
||||
ConsoleIO.WriteLineFormatted(Translations.chat_fail, acceptnewlines: true);
|
||||
ConsoleIO.WriteLineFormatted("§8" + Translations.chat_fail, acceptnewlines: true);
|
||||
}
|
||||
httpClient.Dispose();
|
||||
}
|
||||
|
|
@ -259,7 +259,7 @@ namespace MinecraftClient.Protocol
|
|||
&& File.Exists(Settings.TranslationsFile_FromMCDir))
|
||||
{
|
||||
Language_File = Settings.TranslationsFile_FromMCDir;
|
||||
ConsoleIO.WriteLineFormatted(Translations.chat_from_dir, acceptnewlines: true);
|
||||
ConsoleIO.WriteLineFormatted("§8" + Translations.chat_from_dir, acceptnewlines: true);
|
||||
}
|
||||
|
||||
//Load the external dictionnary of translation rules or display an error message
|
||||
|
|
@ -278,11 +278,11 @@ namespace MinecraftClient.Protocol
|
|||
}
|
||||
|
||||
if (Settings.Config.Logging.DebugMessages)
|
||||
ConsoleIO.WriteLineFormatted(Translations.chat_loaded, acceptnewlines: true);
|
||||
ConsoleIO.WriteLineFormatted("§8" + Translations.chat_loaded, acceptnewlines: true);
|
||||
}
|
||||
else //No external dictionnary found.
|
||||
{
|
||||
ConsoleIO.WriteLineFormatted(string.Format(Translations.chat_not_found, Language_File));
|
||||
ConsoleIO.WriteLineFormatted("§8" + string.Format(Translations.chat_not_found, Language_File));
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -163,7 +163,7 @@ namespace MinecraftClient.Protocol.Keys
|
|||
}
|
||||
catch (IOException e)
|
||||
{
|
||||
ConsoleIO.WriteLineFormatted(string.Format(Translations.cache_read_fail_plain_keys, e.Message));
|
||||
ConsoleIO.WriteLineFormatted("§8" + string.Format(Translations.cache_read_fail_plain_keys, e.Message));
|
||||
}
|
||||
}
|
||||
|
||||
|
|
@ -176,7 +176,7 @@ namespace MinecraftClient.Protocol.Keys
|
|||
private static void SaveToDisk()
|
||||
{
|
||||
if (Config.Logging.DebugMessages)
|
||||
ConsoleIO.WriteLineFormatted(Translations.cache_saving_keys, acceptnewlines: true);
|
||||
ConsoleIO.WriteLineFormatted("§8" + Translations.cache_saving_keys, acceptnewlines: true);
|
||||
|
||||
List<string> KeysCacheLines = new()
|
||||
{
|
||||
|
|
@ -192,7 +192,7 @@ namespace MinecraftClient.Protocol.Keys
|
|||
}
|
||||
catch (IOException e)
|
||||
{
|
||||
ConsoleIO.WriteLineFormatted(string.Format(Translations.cache_save_fail_keys, e.Message));
|
||||
ConsoleIO.WriteLineFormatted("§8" + string.Format(Translations.cache_save_fail_keys, e.Message));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -56,7 +56,7 @@ namespace MinecraftClient.Protocol
|
|||
.ThenBy(record => Guid.NewGuid())
|
||||
.First();
|
||||
string target = result.Target.Value.Trim('.');
|
||||
ConsoleIO.WriteLineFormatted(string.Format(Translations.mcc_found, target, result.Port, domainVal));
|
||||
ConsoleIO.WriteLineFormatted("§8" + string.Format(Translations.mcc_found, target, result.Port, domainVal));
|
||||
domainVal = target;
|
||||
portVal = result.Port;
|
||||
foundService = true;
|
||||
|
|
@ -64,7 +64,7 @@ namespace MinecraftClient.Protocol
|
|||
}
|
||||
catch (Exception e)
|
||||
{
|
||||
ConsoleIO.WriteLineFormatted(string.Format(Translations.mcc_not_found, domainVal, e.GetType().FullName, e.Message));
|
||||
ConsoleIO.WriteLineFormatted("§8" + string.Format(Translations.mcc_not_found, domainVal, e.GetType().FullName, e.Message));
|
||||
}
|
||||
}, TimeSpan.FromSeconds(Config.Main.Advanced.ResolveSrvRecords == MainConfigHealper.MainConfig.AdvancedConfig.ResolveSrvRecordType.fast ? 10 : 30));
|
||||
}
|
||||
|
|
@ -96,7 +96,7 @@ namespace MinecraftClient.Protocol
|
|||
success = true;
|
||||
}
|
||||
else
|
||||
ConsoleIO.WriteLineFormatted(Translations.error_unexpect_response, acceptnewlines: true);
|
||||
ConsoleIO.WriteLineFormatted("§8" + Translations.error_unexpect_response, acceptnewlines: true);
|
||||
}
|
||||
catch (Exception e)
|
||||
{
|
||||
|
|
@ -105,9 +105,9 @@ namespace MinecraftClient.Protocol
|
|||
}, TimeSpan.FromSeconds(Config.Main.Advanced.ResolveSrvRecords == MainConfigHealper.MainConfig.AdvancedConfig.ResolveSrvRecordType.fast ? 10 : 30)))
|
||||
{
|
||||
if (protocolversion != 0 && protocolversion != protocolversionTmp)
|
||||
ConsoleIO.WriteLineFormatted(Translations.error_version_different, acceptnewlines: true);
|
||||
ConsoleIO.WriteLineFormatted("§8" + Translations.error_version_different, acceptnewlines: true);
|
||||
if (protocolversion == 0 && protocolversionTmp <= 1)
|
||||
ConsoleIO.WriteLineFormatted(Translations.error_no_version_report, acceptnewlines: true);
|
||||
ConsoleIO.WriteLineFormatted("§8" + Translations.error_no_version_report, acceptnewlines: true);
|
||||
if (protocolversion == 0)
|
||||
protocolversion = protocolversionTmp;
|
||||
forgeInfo = forgeInfoTmp;
|
||||
|
|
@ -115,7 +115,7 @@ namespace MinecraftClient.Protocol
|
|||
}
|
||||
else
|
||||
{
|
||||
ConsoleIO.WriteLineFormatted(Translations.error_connection_timeout, acceptnewlines: true);
|
||||
ConsoleIO.WriteLineFormatted("§8" + Translations.error_connection_timeout, acceptnewlines: true);
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
|
@ -491,7 +491,7 @@ namespace MinecraftClient.Protocol
|
|||
}
|
||||
else
|
||||
{
|
||||
ConsoleIO.WriteLineFormatted(string.Format(Translations.error_http_code, code));
|
||||
ConsoleIO.WriteLineFormatted("§8" + string.Format(Translations.error_http_code, code));
|
||||
return LoginResult.OtherError;
|
||||
}
|
||||
}
|
||||
|
|
@ -694,7 +694,7 @@ namespace MinecraftClient.Protocol
|
|||
}
|
||||
else
|
||||
{
|
||||
ConsoleIO.WriteLineFormatted(string.Format(Translations.error_auth, code));
|
||||
ConsoleIO.WriteLineFormatted("§8" + string.Format(Translations.error_auth, code));
|
||||
return LoginResult.OtherError;
|
||||
}
|
||||
}
|
||||
|
|
@ -895,7 +895,7 @@ namespace MinecraftClient.Protocol
|
|||
try
|
||||
{
|
||||
if (Settings.Config.Logging.DebugMessages)
|
||||
ConsoleIO.WriteLineFormatted(string.Format(Translations.debug_request, host));
|
||||
ConsoleIO.WriteLineFormatted("§8" + string.Format(Translations.debug_request, host));
|
||||
|
||||
TcpClient client = ProxyHandler.NewTcpClient(host, 443, true);
|
||||
SslStream stream = new(client.GetStream());
|
||||
|
|
|
|||
|
|
@ -190,7 +190,7 @@ namespace MinecraftClient.Protocol.Session
|
|||
}
|
||||
catch (IOException ex)
|
||||
{
|
||||
ConsoleIO.WriteLineFormatted(string.Format(Translations.cache_read_fail, ex.Message));
|
||||
ConsoleIO.WriteLineFormatted("§8" + string.Format(Translations.cache_read_fail, ex.Message));
|
||||
}
|
||||
catch (SerializationException ex2)
|
||||
{
|
||||
|
|
@ -236,7 +236,7 @@ namespace MinecraftClient.Protocol.Session
|
|||
}
|
||||
catch (IOException e)
|
||||
{
|
||||
ConsoleIO.WriteLineFormatted(string.Format(Translations.cache_read_fail_plain, e.Message));
|
||||
ConsoleIO.WriteLineFormatted("§8" + string.Format(Translations.cache_read_fail_plain, e.Message));
|
||||
}
|
||||
}
|
||||
|
||||
|
|
@ -249,7 +249,7 @@ namespace MinecraftClient.Protocol.Session
|
|||
private static void SaveToDisk()
|
||||
{
|
||||
if (Config.Logging.DebugMessages)
|
||||
ConsoleIO.WriteLineFormatted(Translations.cache_saving, acceptnewlines: true);
|
||||
ConsoleIO.WriteLineFormatted("§8" + Translations.cache_saving, acceptnewlines: true);
|
||||
|
||||
List<string> sessionCacheLines = new()
|
||||
{
|
||||
|
|
@ -265,7 +265,7 @@ namespace MinecraftClient.Protocol.Session
|
|||
}
|
||||
catch (IOException e)
|
||||
{
|
||||
ConsoleIO.WriteLineFormatted(string.Format(Translations.cache_save_fail, e.Message));
|
||||
ConsoleIO.WriteLineFormatted("§8" + string.Format(Translations.cache_save_fail, e.Message));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue