mirror of
https://github.com/MCCTeam/Minecraft-Console-Client
synced 2025-10-14 21:22:49 +00:00
Add player join/leave event to ChatBot API (#1181)
* Add player join/leave event to ChatBot API (#1180) * Add method documentation * Dispatch Join/Leave after updating player list Co-authored-by: ORelio <ORelio@users.noreply.github.com>
This commit is contained in:
parent
a17d60047a
commit
4a8fb08f4b
2 changed files with 18 additions and 0 deletions
|
|
@ -1759,6 +1759,8 @@ namespace MinecraftClient
|
|||
{
|
||||
onlinePlayers[uuid] = name;
|
||||
}
|
||||
|
||||
DispatchBotEvent(bot => bot.OnPlayerJoin(uuid, name));
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
|
|
@ -1771,6 +1773,8 @@ namespace MinecraftClient
|
|||
{
|
||||
onlinePlayers.Remove(uuid);
|
||||
}
|
||||
|
||||
DispatchBotEvent(bot => bot.OnPlayerLeave(uuid, onlinePlayers[uuid]));
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue