Pickup Item
Pickup Item
This unlocker will trigger when a player picks up an item.
id
pickup item
Data
Important
You have to set at least one of the following data.
name Optional
- Type:
string
- Default:
none
- Description: The name of the item.
lore Optional
- Type:
string
- Default:
none
- Description: The lore of the item.
nbt Optional
- Type:
string
- Default:
none
- Description: The NBT of the item.
Condition
yui-item
id: yui-item
/ item
Syntax:
item take
removes the picked-up item from the player's inventory.item total-amount
returns the total amount of the picked-up item.item pick-amount
returns the amount of items picked up this time.
Variable
type
Returns the name of the picked-up item type
display-name
Returns the display name of the picked-up item
Example
- type: "pickup item"
data:
name: "diamond" # Name of the item
lore: "diamond" # Lore of the item (as long as any lore contains the corresponding content)
nbt: "diamond" # NBT of the item, by default, it contains the NBT @yuillustration-item-pickup
condition: |-
check yui-item total-amount == 5