mirror of
https://github.com/MCCTeam/Minecraft-Console-Client
synced 2025-10-14 21:22:49 +00:00
Inventory handling improvements
Fix click issue for item with NBT Show custom display names in inventory See issues #910 #912 #914
This commit is contained in:
parent
b01c50b792
commit
dbe02c063c
4 changed files with 51 additions and 9 deletions
|
|
@ -37,7 +37,12 @@ namespace MinecraftClient.Commands
|
|||
List<string> response = new List<string>();
|
||||
response.Add("Inventory #" + inventoryId + " - " + inventory.Title + "§8");
|
||||
foreach (KeyValuePair<int, Item> item in inventory.Items)
|
||||
response.Add(String.Format(" #{0}: {1} x{2}", item.Key, item.Value.Type, item.Value.Count));
|
||||
{
|
||||
string displayName = item.Value.DisplayName;
|
||||
if (String.IsNullOrEmpty(displayName))
|
||||
response.Add(String.Format(" #{0}: {1} x{2}", item.Key, item.Value.Type, item.Value.Count));
|
||||
else response.Add(String.Format(" #{0}: {1} x{2} - {3}§8", item.Key, item.Value.Type, item.Value.Count, displayName));
|
||||
}
|
||||
return String.Join("\n", response.ToArray());
|
||||
case "click":
|
||||
if (args.Length == 3)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue