diff --git a/MinecraftClient/ChatBot.cs b/MinecraftClient/ChatBot.cs index 790cbfcb..cca54636 100644 --- a/MinecraftClient/ChatBot.cs +++ b/MinecraftClient/ChatBot.cs @@ -320,6 +320,11 @@ namespace MinecraftClient /// Name of the player public virtual void OnPlayerLeave(Guid uuid, string name) { } + /// + /// Called when the player deaths + /// + public virtual void OnDeath() { } + /// /// Called when the player respawns /// diff --git a/MinecraftClient/McClient.cs b/MinecraftClient/McClient.cs index 4ec942ce..11967476 100644 --- a/MinecraftClient/McClient.cs +++ b/MinecraftClient/McClient.cs @@ -2027,6 +2027,7 @@ namespace MinecraftClient { ConsoleIO.WriteLogLine("You are dead. Type /respawn to respawn."); } + DispatchBotEvent(bot => bot.OnDeath()); } DispatchBotEvent(bot => bot.OnHealthUpdate(health, food));