Slot Change
constructor(physicalSlot: Int, virtualSlot: Int, oldItem: ItemStack?, newItem: ItemStack?, virtualInventory: VirtualInventory)
Parameters
physical Slot
The physical slot index in the player's inventory that was interacted with.
virtual Slot
The corresponding virtual slot index in the virtual inventory that is affected by the interaction.
old Item
The item that was in the slot before the interaction. This can be null if the slot was empty.
new Item
The item that will be in the slot after the interaction. This can be null if the slot will be empty after the interaction.
virtual Inventory
The virtual inventory that is being interacted with. This is used to determine which virtual inventory the slot change belongs to, as there may be multiple virtual inventories in the GUI.