mirror of
https://github.com/MCCTeam/Minecraft-Console-Client
synced 2025-10-14 21:22:49 +00:00
Delay BrandInfo sending
Implement Game Join event and send Brand Info only when server acknowledged game join, as ZizzyDizzyMC did before, else server may generate an invalid packet error because it was still in "login" mode and not in "playing" mode. Fix second issue in #95
This commit is contained in:
parent
8bd130eb3a
commit
b25a665c82
3 changed files with 19 additions and 3 deletions
|
|
@ -120,9 +120,6 @@ namespace MinecraftClient
|
|||
{
|
||||
if (handler.Login())
|
||||
{
|
||||
if (!String.IsNullOrWhiteSpace(Settings.BrandInfo))
|
||||
handler.SendBrandInfo(Settings.BrandInfo.Trim());
|
||||
|
||||
if (singlecommand)
|
||||
{
|
||||
handler.SendChatMessage(command);
|
||||
|
|
@ -322,6 +319,16 @@ namespace MinecraftClient
|
|||
client.Close();
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Called when a server was successfully joined
|
||||
/// </summary>
|
||||
|
||||
public void OnGameJoined()
|
||||
{
|
||||
if (!String.IsNullOrWhiteSpace(Settings.BrandInfo))
|
||||
handler.SendBrandInfo(Settings.BrandInfo.Trim());
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Received some text from the server
|
||||
/// </summary>
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue