mirror of
https://github.com/MCCTeam/Minecraft-Console-Client
synced 2025-10-14 21:22:49 +00:00
Made ChatBotAPI OnEntityDespawn to pass Entity object instead of EntityID
This commit is contained in:
parent
dbf5334758
commit
7fbf9443a1
4 changed files with 9 additions and 10 deletions
|
|
@ -22,7 +22,7 @@ namespace MinecraftClient.ChatBots
|
|||
if (!GetEntityHandlingEnabled())
|
||||
{
|
||||
ConsoleIO.WriteLine("[AutoAttack] Entity Handling is not enabled in the config file!");
|
||||
ConsoleIO.WriteLine("Please enable it to use this bot.");
|
||||
ConsoleIO.WriteLine("[AutoAttack] This bot will be unloaded.");
|
||||
UnloadBot();
|
||||
}
|
||||
}
|
||||
|
|
@ -53,11 +53,11 @@ namespace MinecraftClient.ChatBots
|
|||
entitiesToTrack.Add(entity.ID, entity);
|
||||
}
|
||||
}
|
||||
public override void OnEntityDespawn(int EntityID)
|
||||
public override void OnEntityDespawn(Entity entity)
|
||||
{
|
||||
if (entitiesToTrack.ContainsKey(EntityID))
|
||||
if (entitiesToTrack.ContainsKey(entity.ID))
|
||||
{
|
||||
entitiesToTrack.Remove(EntityID);
|
||||
entitiesToTrack.Remove(entity.ID);
|
||||
}
|
||||
}
|
||||
public override void OnEntityMove(Entity entity)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue