PlayerClass.server_onInventoryChanges

Called when the Player has changes in the inventory Container.

Kind: Callback

Environments: Game

Game

Callback side: Server

PlayerClass:server_onInventoryChanges( inventory, changes )

Open the full Game reference

Will receive a table listing the changes.

Element format:

Type Name Description
Uuid uuid The item uuid
integer difference The change in amount. Positive numbers mean item gain, negative item loss.
Tool tool (Optional) If the item is a Tool, this is the tool. Otherwise nil.

Parameters:

Name Type Description
self table The class instance.
inventory Container The player's inventory Container.
changes table A table listing the changes. {{uuid=Uuid, difference=integer, tool=Tool}, ..}