mirror of
https://github.com/MCCTeam/Minecraft-Console-Client
synced 2025-10-14 21:22:49 +00:00
Added chat timestamps feature
Idea from LehmusFIN
This commit is contained in:
parent
26def01dae
commit
cd2fe152e6
2 changed files with 8 additions and 0 deletions
|
|
@ -302,6 +302,11 @@ namespace MinecraftClient
|
|||
{
|
||||
if (!String.IsNullOrEmpty(str))
|
||||
{
|
||||
if (Settings.chatTimeStamps)
|
||||
{
|
||||
int hour = DateTime.Now.Hour, minute = DateTime.Now.Minute, second = DateTime.Now.Second;
|
||||
ConsoleIO.Write(hour.ToString("00") + ':' + minute.ToString("00") + ':' + second.ToString("00") + ' ');
|
||||
}
|
||||
if (!acceptnewlines) { str = str.Replace('\n', ' '); }
|
||||
if (ConsoleIO.basicIO) { ConsoleIO.WriteLine(str); return; }
|
||||
string[] subs = str.Split(new char[] { '§' });
|
||||
|
|
|
|||
|
|
@ -29,6 +29,7 @@ namespace MinecraftClient
|
|||
public static string TranslationsFile_Website_Download = "http://resources.download.minecraft.net";
|
||||
public static List<string> Bots_Owners = new List<string>();
|
||||
public static string Language = "en_GB";
|
||||
public static bool chatTimeStamps = false;
|
||||
|
||||
//AntiAFK Settings
|
||||
public static bool AntiAFK_Enabled = false;
|
||||
|
|
@ -122,6 +123,7 @@ namespace MinecraftClient
|
|||
case "singlecommand": SingleCommand = argValue; break;
|
||||
case "language": Language = argValue; break;
|
||||
case "consoletitle": ConsoleTitle = argValue; break;
|
||||
case "timestamps": chatTimeStamps = str2bool(argValue); break;
|
||||
case "botowners":
|
||||
Bots_Owners.Clear();
|
||||
foreach (string name in argValue.ToLower().Replace(" ", "").Split(','))
|
||||
|
|
@ -225,6 +227,7 @@ namespace MinecraftClient
|
|||
+ "language=en_GB\r\n"
|
||||
+ "botowners=Player1,Player2,Player3\r\n"
|
||||
+ "consoletitle=%username% - Minecraft Console Client\r\n"
|
||||
+ "timestamps=false\r\n"
|
||||
+ "\r\n"
|
||||
+ "#Bot Settings\r\n"
|
||||
+ "\r\n"
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue