createItem
Creates a new stack with a single item with itemId.
Creates a new stack of the item with itemId and the given amount.
Creates a new stack of the item with itemId and the given amount for the player.
Creates a new stack of the item with itemId. The caller owns the returned stack.
Return
the stack, or null if the ID is unknown or the payload is invalid.
Parameters
Amount of items. It is kept within 1 and the maximum stack size of the item.
The player the item is created for, or null if there is no such player. Some items depend on the player, like items scaled to the player's level.
Additional configuration of the item in the format of its provider. A blank payload is the same as null. For example, minecraft takes item components like [damage=10]. Providers taking no payload ignore it. If the payload is invalid, the item is not created and a warning is logged.