Anvil Prepare Event (Event) — SkBee

Addon: SkBee · Category: Event · Since: 1.11.0

Syntax

[on] [skbee] anvil prepare

Description

Called when a player attempts to combine 2 items in an anvil. 'event-slot' represents the result slot, can be used to get or set.

Event Values

  • event-inventory
  • event-itemstack
  • event-player
  • event-slot

Examples

on anvil prepare:
	if slot 0 of event-inventory is a diamond sword:
		if slot 1 of event-inventory is an enchanted book:
			if stored enchants of slot 1 of event-inventory contains sharpness 5:
				set {_i} to slot 0 of event-inventory
				add "&aOOOOOOO" and "&bAHHHHHH" to lore of {_i}
				enchant {_i} with sharpness 6
				set event-slot to {_i}
				set repair cost of event-inventory to 30

View source