mirror of
https://github.com/MCCTeam/Minecraft-Console-Client
synced 2025-10-14 21:22:49 +00:00
Added Player Killed event (Combat and CombatDeath packets).
This commit is contained in:
parent
01eee22921
commit
80e227c3a7
5 changed files with 65 additions and 1 deletions
|
|
@ -2878,6 +2878,19 @@ namespace MinecraftClient
|
|||
DispatchBotEvent(bot => bot.OnPlayerLeave(uuid, username));
|
||||
}
|
||||
|
||||
// <summary>
|
||||
/// This method is called when a player has been killed by another entity
|
||||
/// </summary>
|
||||
/// <param name="playerEntity">Victim's entity</param>
|
||||
/// <param name="killerEntity">Killer's entity</param>
|
||||
public void OnPlayerKilled(int killerEntityId, string chatMessage)
|
||||
{
|
||||
if (!entities.ContainsKey(killerEntityId))
|
||||
return;
|
||||
|
||||
DispatchBotEvent(bot => bot.OnKilled(entities[killerEntityId], chatMessage));
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Called when a plugin channel message was sent from the server.
|
||||
/// </summary>
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue