mirror of
https://github.com/MCCTeam/Minecraft-Console-Client
synced 2025-11-07 17:36:07 +00:00
Fix player inventory being deleted by server (#1430)
* Fix auto drop crash * Fix player inventory being deleted by server
This commit is contained in:
parent
f5f1a22b93
commit
d19764869c
3 changed files with 14 additions and 2 deletions
|
|
@ -200,6 +200,12 @@ namespace MinecraftClient.ChatBots
|
|||
{
|
||||
if (inventoryUpdated != -1)
|
||||
{
|
||||
if (!GetInventories().ContainsKey(inventoryUpdated))
|
||||
{
|
||||
// Inventory updated but no inventory ?
|
||||
LogDebugToConsoleTranslated("bot.autoDrop.no_inventory", inventoryUpdated);
|
||||
return;
|
||||
}
|
||||
var inventory = GetInventories()[inventoryUpdated];
|
||||
var items = inventory.Items.ToDictionary(entry => entry.Key, entry => entry.Value);
|
||||
if (dropMode == Mode.Include)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue