c0de 0.3.0Diese Seite auf Deutsch

DELETE_ITEMS ​

Removes items from an inventory.

It removes up to count items and returns how many were removed. This needs allowInventoryChanges or an administrator as owner, otherwise PERMISSION_DENIED is raised.

Parameters and results

  • position STRUCT c0de/minecraft/POSITION: the block with the inventory
  • id STRING: the item ID, e.g. minecraft:rotten_flesh
  • count INTEGER: the most items to remove
  • result result INTEGER: the number of removed items

Example

c0de
CALL c0de/minecraft/DELETE_ITEMS
    PARAMETER position trashChest ;
    PARAMETER id "minecraft:rotten_flesh" ;
    PARAMETER count 64 ;
    RESULT result removed