I'm running a vanilla 1.19 Java server.
I have two questions ...
Q1: Using commands, how can I get an inventory item's damage?
So far, I have /data get entity @p Inventory[{Slot:8b}]
This gives me info about the item in the 9th toolbar slot ... but this command returns a structure.
I want just .Damage; how can I get just that value?
Q2: Using commands, how do I go about setting the damage for this item?
Thanks for any help!
1