Handle the player consuming an item

This code will write to the server console when a player consumes an item

Note: You must be hungry to consume an item
This command will set your hunger:
/js self.setExhaustion(100)