Inventory paper/inventory_remove

Inventory Remove

Removes a specified amount of a material from a player's inventory.

Note: If the player doesn't have enough items, as many as possible are removed. Connect the name output of a Material node to the material input for a validated material name.

Inputs

NameTypeOptionalDescription
exec exec Incoming execution.
player player The player.
item item_stack ItemStack to remove (takes priority over material).
material string Material name (used when no item is connected).
amount number Amount to remove.

Outputs

NameTypeDescription
exec exec Continues after removing.
removed number Actual amount removed.

Properties

KeyTypeDefaultDescription
material string "DIAMOND" Material
amount number 1 Amount