VirtualInventory

constructor(size: Int, itemStacks: Array<ItemStack?> = arrayOfNulls(size))

Parameters

size

The size of the virtual inventory, which determines how many slots it has. This should be a positive integer and is typically a multiple of 9 to fit standard Minecraft inventory layouts.

itemStacks

An optional array of ItemStacks to initialize the inventory with. If no array is provided, the inventory will be initialized with null values (empty slots). The length of this array should match the specified size of the inventory.