Find an item's slot
The first slot holding an item of a type, or -1 when the player has none.
A Minecraft element (a value) in Items & inventories. Needs the Basic plan or higher to go live; building and testing are free.
Example
When a player uses a command → Find an item's slot minecraft:compass → Select hotbar slot.
Also called
find item, which slot, locate item, first slot
Works as a data pack?
No. This one needs the Elementium plugin on a Paper server.
What you give it
- Player
What it gives back
- Slot
- Found