mirror of
https://github.com/MCCTeam/Minecraft-Console-Client
synced 2025-10-14 21:22:49 +00:00
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:
parent
73ba2d1555
commit
9169036893
5 changed files with 42 additions and 70 deletions
|
|
@ -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>
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue