diff --git a/MinecraftClient/Commands/Inventory.cs b/MinecraftClient/Commands/Inventory.cs index 3fba3856..e0ceb307 100644 --- a/MinecraftClient/Commands/Inventory.cs +++ b/MinecraftClient/Commands/Inventory.cs @@ -32,6 +32,8 @@ namespace MinecraftClient.Commands else return "Failed to close Inventory #" + inventoryId; case "list": Container inventory = handler.GetInventory(inventoryId); + if(inventory==null) + return "Inventory #" + inventoryId + " do not exist"; List response = new List(); response.Add("Inventory #" + inventoryId + " - " + inventory.Title + "ยง8"); foreach (KeyValuePair item in inventory.Items)