Implement global chat message cooldown (#661)

Merge 'splitmessagedelay' and 'botmessagedelay' settings into
a single 'messagecooldown' entry, implement global cooldown to
fix autorespond, scripts and commands not being delayed properly.
This commit is contained in:
ORelio 2020-10-24 17:41:35 +02:00
parent 73ba2d1555
commit 9169036893
5 changed files with 42 additions and 70 deletions

View file

@ -233,13 +233,13 @@ namespace MinecraftClient
/// Send text to the server. Can be anything such as chat messages or commands
/// </summary>
/// <param name="text">Text to send to the server</param>
/// <returns>True if the text was sent with no error</returns>
/// <returns>TRUE if successfully sent (Deprectated, always returns TRUE for compatibility purposes with existing scripts)</returns>
public bool SendText(object text)
{
bool result = base.SendText(text is string ? (string)text : text.ToString());
base.SendText(text is string ? (string)text : text.ToString());
tickHandler.WaitOne();
Thread.Sleep(1000);
return result;
return true;
}
/// <summary>