The ItemStopUseAfterEvent interface in @minecraft/server.
Interface in @minecraft/server
Extends ItemUseOverTimeEvent
import type { ItemStopUseAfterEvent } from '@minecraft/server';Subscribe to it with world.afterEvents.itemStopUse.
Example
Section titled “Example”import { world, type ItemStopUseAfterEvent } from '@minecraft/server';
world.afterEvents.itemStopUse.subscribe((event: ItemStopUseAfterEvent) => { console.log('itemStopUse', event.source.name, event.itemStack.typeId, event.useDuration);});import { world } from '@minecraft/server';
world.afterEvents.itemStopUse.subscribe((event) => { console.log('itemStopUse', event.source.name, event.itemStack.typeId, event.useDuration);});Used by
Section titled “Used by”WorldAfterEvents.itemStopUse, ItemStopUseAfterEventSignal.subscribe, ItemStopUseAfterEventSignal.unsubscribe