Anvil Repair Cost (Expression) — Skript

Addon: Skript · Category: Expression · Since: 2.8.0

Syntax

[the] [anvil] [item] [max[imum]] repair cost [of %inventories%]

Description

Returns the experience cost (in levels) to complete the current repair or the maximum experience cost (in levels) to be allowed by the current repair. The default value of max cost set by vanilla Minecraft is 40.

Examples

on inventory click:
	if {AnvilRepairSaleActive} = true:
		wait a tick # recommended, to avoid client bugs
		set anvil repair cost to anvil repair cost * 50%
		send "Anvil repair sale is ON!" to player
on inventory click:
	player have permission "anvil.repair.max.bypass"
	set max repair cost of event-inventory to 99999

View source