setItemInSlot

public static void setItemInSlot(InventoryClickEvent event, int slot, ItemStack updatedItem)

Set the item in a slot in an inventory click event. This method uses reflection to get the method, unreflect it, and invoke using a method handle.

Parameters

event

The inventory click event

slot

The slot

updatedItem

The updated item