ðInventoryService
Service for handling inventory actions.
Example usage:
Functions
Gives a player a specified number of an item. If playWorldEffect
is true, an effect will play showing the recipient getting their items.
getAmount(player: Player, itemType: ItemType): number
Returns amount of specified item the player has (0 if they have none).
removeItemAmount(player: Player, itemType: ItemType, amount: number)
Removes the amount of the item from the player's inventory.
clearInventory(player: Player)
Clears all items from the player's inventory.
getInventory(player: Player): { itemType: ItemType, amount: number }[]
Returns a table of the amount of each item the player has in their inventory - including armor and hand items.
Example:
Last updated