mirror of
https://github.com/MCCTeam/Minecraft-Console-Client
synced 2025-10-14 21:22:49 +00:00
parent
7c9c12bee7
commit
dc09896959
8 changed files with 28 additions and 11 deletions
|
|
@ -439,9 +439,17 @@ namespace MinecraftClient
|
|||
/// Received some text from the server
|
||||
/// </summary>
|
||||
/// <param name="text">Text received</param>
|
||||
/// <param name="isJson">TRUE if the text is JSON-Encoded</param>
|
||||
/// <param name="links">Links embedded in text</param>
|
||||
public void OnTextReceived(string text, IEnumerable<string> links)
|
||||
public void OnTextReceived(string text, bool isJson)
|
||||
{
|
||||
List<string> links = new List<string>();
|
||||
string json = null;
|
||||
if (isJson)
|
||||
{
|
||||
json = text;
|
||||
text = ChatParser.ParseText(json, links);
|
||||
}
|
||||
ConsoleIO.WriteLineFormatted(text, false);
|
||||
if (Settings.DisplayChatLinks)
|
||||
foreach (string link in links)
|
||||
|
|
@ -451,6 +459,7 @@ namespace MinecraftClient
|
|||
try
|
||||
{
|
||||
bots[i].GetText(text);
|
||||
bots[i].GetText(text, json);
|
||||
}
|
||||
catch (Exception e)
|
||||
{
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue