On Piglin Barter (Event) — Skript

Addon: Skript · Category: Event · Since: 2.10

Syntax

[on] piglin (barter[ing]|trad(e|ing))

Description

Called when a piglin finishes bartering. A piglin may start bartering after picking up an item on its bartering list. Cancelling will prevent piglins from dropping items, but will still make them pick up the input.

Event Values

  • event-commandsender
  • event-entity
  • event-entitydata
  • event-location
  • event-world

Examples

on piglin barter:
	if barter drops contain diamond:
		send "Diamonds belong in the money pit!" to player
		cancel event

View source