mirror of
https://github.com/MCCTeam/Minecraft-Console-Client
synced 2025-10-14 21:22:49 +00:00
Various fixes
- Re-add support for MC 1.6 chat color names - Re-add support for MC 1.5- vanilla whispers in ChatBot - Add /connect in main chat prompt (reported by TNT-UP)
This commit is contained in:
parent
84ba8fd0ae
commit
898a04a843
4 changed files with 30 additions and 19 deletions
|
|
@ -138,10 +138,15 @@ namespace MinecraftClient
|
|||
try
|
||||
{
|
||||
//Detect vanilla /tell messages
|
||||
//Someone whispers to you: message
|
||||
//Someone whispers message (MC 1.5)
|
||||
//Someone whispers to you: message (MC 1.7)
|
||||
if (tmp.Length > 2 && tmp[1] == "whispers")
|
||||
{
|
||||
message = text.Substring(tmp[0].Length + 18);
|
||||
if (tmp.Length > 4 && tmp[2] == "to" && tmp[3] == "you:")
|
||||
{
|
||||
message = text.Substring(tmp[0].Length + 18); //MC 1.7
|
||||
}
|
||||
else message = text.Substring(tmp[0].Length + 10); //MC 1.5
|
||||
sender = tmp[0];
|
||||
return isValidName(sender);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -189,6 +189,11 @@ namespace MinecraftClient
|
|||
{
|
||||
BotLoad(new ChatBots.Script(text.Substring(8)));
|
||||
}
|
||||
else if (text.ToLower().StartsWith("/connect "))
|
||||
{
|
||||
Settings.ServerIP = text.Substring(9);
|
||||
Program.Restart();
|
||||
}
|
||||
else if (text != "")
|
||||
{
|
||||
//Message is too long
|
||||
|
|
|
|||
|
|
@ -56,22 +56,23 @@ namespace MinecraftClient.Protocol.Handlers
|
|||
{
|
||||
switch (colorname.ToLower())
|
||||
{
|
||||
case "black": return "§0";
|
||||
case "dark_blue": return "§1";
|
||||
case "dark_green": return "§2";
|
||||
case "dark_aqua": return "§3";
|
||||
case "dark_red": return "§4";
|
||||
case "dark_purple": return "§5";
|
||||
case "gold": return "§6";
|
||||
case "gray": return "§7";
|
||||
case "dark_gray": return "§8";
|
||||
case "blue": return "§9";
|
||||
case "green": return "§a";
|
||||
case "aqua": return "§b";
|
||||
case "red": return "§c";
|
||||
case "light_purple": return "§d";
|
||||
case "yellow": return "§e";
|
||||
case "white": return "§f";
|
||||
/* MC 1.7+ Name MC 1.6 Name Classic tag */
|
||||
case "black": /* Blank if same */ return "§0";
|
||||
case "dark_blue": return "§1";
|
||||
case "dark_green": return "§2";
|
||||
case "dark_aqua": case "dark_cyan": return "§3";
|
||||
case "dark_red": return "§4";
|
||||
case "dark_purple": case "dark_magenta": return "§5";
|
||||
case "gold": case "dark_yellow": return "§6";
|
||||
case "gray": return "§7";
|
||||
case "dark_gray": return "§8";
|
||||
case "blue": return "§9";
|
||||
case "green": return "§a";
|
||||
case "aqua": case "cyan": return "§b";
|
||||
case "red": return "§c";
|
||||
case "light_purple": case "magenta": return "§d";
|
||||
case "yellow": return "§e";
|
||||
case "white": return "§f";
|
||||
default: return "";
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -148,7 +148,7 @@ namespace MinecraftClient.Protocol
|
|||
}
|
||||
|
||||
/// <summary>
|
||||
/// Check session using Mojang's Yggdrasil authentication scheme. Allow to join an online-mode server
|
||||
/// Check session using Mojang's Yggdrasil authentication scheme. Allows to join an online-mode server
|
||||
/// </summary>
|
||||
/// <param name="user">Username</param>
|
||||
/// <param name="accesstoken">Session ID</param>
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue