Show links embedded in chat

Allows clicking if supported by terminal,
or at least copy and paste to web browser.

Suggestion by brkmrr9 in #207
This commit is contained in:
ORelio 2016-10-07 19:52:28 +02:00
parent 9cd983c50d
commit 1180c06b1f
6 changed files with 59 additions and 28 deletions

View file

@ -436,9 +436,13 @@ namespace MinecraftClient
/// Received some text from the server
/// </summary>
/// <param name="text">Text received</param>
public void OnTextReceived(string text)
/// <param name="links">Links embedded in text</param>
public void OnTextReceived(string text, IEnumerable<string> links)
{
ConsoleIO.WriteLineFormatted(text, false);
if (Settings.DisplayChatLinks)
foreach (string link in links)
ConsoleIO.WriteLineFormatted("§8MCC: Link: " + link, false);
for (int i = 0; i < bots.Count; i++)
{
try