This commit is contained in:
2022-05-14 18:58:48 +03:00
parent 1b28412cd5
commit 0d506d30c8
9 changed files with 44 additions and 24 deletions

View File

@@ -59,7 +59,7 @@ namespace PluginManager.Loaders
Plugins = new List<DBCommand>();
Events = new List<DBEvent>();
Functions.WriteLogFile("Starting plugin loader...");
Functions.WriteLogFile("Starting plugin loader ... Client: " + client.CurrentUser.Username);
if (LanguageSystem.Language.ActiveLanguage != null)
Console_Utilities.WriteColorText(
LanguageSystem.Language.ActiveLanguage.FormatText(

View File

@@ -133,19 +133,21 @@ namespace PluginManager.Others
}
/// <summary>
/// Write the text using color options( &g-green; &b-blue; &r-red; &c-clear; )
/// Write text using colors: &g - green, &r - red, &b - blue, &m - magenta, &c - Clear
/// </summary>
/// <param name="text">The text</param>
/// <param name="text"></param>
/// <param name="appendNewLine"></param>
public static void WriteColorText(string text, bool appendNewLine = true)
{
string[] words = text.Split(' ');
ConsoleColor fg = Console.ForegroundColor;
Dictionary<string, ConsoleColor> colors = new Dictionary<string, ConsoleColor>()
{
{"&g", ConsoleColor.Green },
{"&b", ConsoleColor.Blue },
{"&r", ConsoleColor.Red },
{"&m", ConsoleColor.Magenta },
{"&c", Console.ForegroundColor }
{"&c", fg }
};
foreach (string word in words)
{
@@ -161,6 +163,8 @@ namespace PluginManager.Others
}
if (appendNewLine)
Console.Write('\n');
Console.ForegroundColor = fg;
}
}