In Game methods for player payment

Iron Ingots, Gold Ingots, Emeralds, and Diamonds can be used as an exchange or payment for in-game items
Here is a sample code that counts the number of emeralds and reduces them by 2 in the hotbar: