The HotbarEventOptions interface in @minecraft/server.
Interface in @minecraft/server
import type { HotbarEventOptions } from '@minecraft/server';Properties
Section titled “Properties”allowedSlots
Section titled “allowedSlots”optional
allowedSlots?: number[];