Slot Change
Represents a change to a specific slot in the virtual inventory as a result of an interaction. This class contains information about the physical slot that was interacted with, the corresponding virtual slot in the virtual inventory, the old item that was in the slot before the interaction, and the new item that will be in the slot after the interaction. It also provides helper properties to determine if the change is an addition, removal, update, or swap of items.
Parameters
The physical slot index in the player's inventory that was interacted with.
The corresponding virtual slot index in the virtual inventory that is affected by the interaction.
The item that was in the slot before the interaction. This can be null if the slot was empty.
The item that will be in the slot after the interaction. This can be null if the slot will be empty after the interaction.
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.