Active Item (Expression) — Skript

Addon: Skript · Category: Expression · Since: 2.8.0

Syntax

[the] (raised|active) (tool|item|weapon) of %livingentities%

Description

Returns the item the entities are currently using (ie: the food they're eating, the bow they're drawing back, etc.). This cannot be changed. If an entity is not using any item, this will return null.

Examples

on damage of player:
	if victim's active tool is a bow:
		interrupt player's active item use

View source