get
Allows for array-like access to the virtual inventory's items using the bracket notation. This operator function delegates to the getItem method, enabling you to retrieve items from the inventory using syntax like virtualInventoryslot. If the slot index is out of bounds or the slot is empty, this will return null. This provides a convenient way to access items in the virtual inventory without needing to call getItem directly.
Parameters
slot
The index of the slot to retrieve, which should be between 0 and size-1. If the slot index is out of bounds or the slot is empty, this will return null.