Skip to main content

getInventory

xPlayer.getInventory(minimal)

This function returns the entire player inventory.

Argument

ArgumentData TypeOptionalDefault ValueExplanation
minimalbooleanYes-Return inventory in a key-value table where key is item name, and only add items with count over 0 to that table.

Returned Table Content

The returned table contains an index-value table, and for each child there is a key-value table with the following content:

ChildData TypeExplanation
namestringItem name
countnumberItem count
labelstringItem label
weightnumberItem weight
usablebooleanWhether or not the item is usable
rarebooleanWhether or not the item is rare
canRemovebooleanWhether or not the item can be thrown