mirror of
https://github.com/MCCTeam/Minecraft-Console-Client
synced 2025-10-14 21:22:49 +00:00
Add code documentation for inventories
This commit is contained in:
parent
195e162c7d
commit
6929ae236a
6 changed files with 134 additions and 18 deletions
|
|
@ -772,7 +772,13 @@ namespace MinecraftClient
|
|||
{
|
||||
inventories.Add(inventory);
|
||||
}
|
||||
ConsoleIO.WriteLine(inventory.Type.ToString());
|
||||
|
||||
if (Settings.DebugMessages)
|
||||
{
|
||||
ConsoleIO.WriteLineFormatted("§8An Inventory opened: " + inventory.Type + " - " + inventory.Title);
|
||||
foreach (var item in inventory.Items)
|
||||
ConsoleIO.WriteLineFormatted("§8 - Slot " + item.Key + ": " + item.Value.ID + " x" + item.Value.Count);
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
|
|
@ -797,12 +803,18 @@ namespace MinecraftClient
|
|||
/// When received window items from server.
|
||||
/// </summary>
|
||||
/// <param name="type">Inventory type</param>
|
||||
/// <param name="itemList">Item list</param>
|
||||
/// <param name="itemList">Item list, key = slot ID, value = Item information</param>
|
||||
public void OnWindowItems(int type, Dictionary<int, Inventory.Item> itemList)
|
||||
{
|
||||
// 0 is player inventory
|
||||
if (type == 0)
|
||||
playerInventory.Items = itemList;
|
||||
if (Settings.DebugMessages)
|
||||
{
|
||||
ConsoleIO.WriteLineFormatted("§8Received Window of type " + type);
|
||||
foreach (var item in itemList)
|
||||
ConsoleIO.WriteLineFormatted("§8 - Slot " + item.Key + ": " + item.Value.ID + " x" + item.Value.Count);
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
|
|
@ -1017,10 +1029,7 @@ namespace MinecraftClient
|
|||
/// <summary>
|
||||
/// Get a dictionary of online player names and their corresponding UUID
|
||||
/// </summary>
|
||||
/// <returns>
|
||||
/// dictionary of online player whereby
|
||||
/// UUID represents the key
|
||||
/// playername represents the value</returns>
|
||||
/// <returns>Dictionay of online players, key is UUID, value is Player name</returns>
|
||||
public Dictionary<string, string> GetOnlinePlayersWithUUID()
|
||||
{
|
||||
Dictionary<string, string> uuid2Player = new Dictionary<string, string>();
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue