Activator PICKUP_ITEM

This activator works when the player pickup an object or stack.

To create this activator, use the command:

/react add PICKUP_ITEM <ActivatorId> [Item:<Item>]

Temporary placeholders operating in this activator:

PlaceholderDescription
%droplocation%Shows the coordinates of the player when he tried to throw something away.
%pickupDelay%Delay (in ticks) before this object will be available for capture by players.
If you change this temporary variable by using the action VAR_TEMP_SET, then the delay will change.
%item%Item string representation. If you change this temporary variable by using the action VAR_TEMP_SET, then the item that the player picks up from the ground will change

Examples

  1. We will forbid players to throw out any items and display the player's coordinates:
    /react add PICKUP_ITEM pi
    /react add pi a CANCEL_EVENT true
    /react add pi a MESSAGE %droplocation%
    /react add pi a MESSAGE %item%
    or
PICKUP_ITEM:
  pi:
    item: ''
    actions:
    - CANCEL_EVENT=true
    - MESSAGE=%droplocation%
    - MESSAGE=%item%
  1. We will forbid to throw out only the diamond block:
    /react add PICKUP_ITEM pi2 item:{type:diamond_block}
    /react add pi2 a CANCEL_EVENT true
PICKUP_ITEM:
  pi2:
    item: type:diamond_block
    actions:
    - CANCEL_EVENT=true