GUI plugins and custom inventories address slots by integer index. Off-by-one mistakes put icons in the wrong place or leave “dead” click zones. Bukkit’s InventoryClickEvent#getRawSlot() uses the same numbering the client protocol uses for that view.
Click to copy — use the free Inventory Slots reference to pick a container type, click slots, and export a DeluxeMenus-ready slots: list.
Section 01
Raw slot indexes
In a top inventory (chest GUI, hopper, etc.), slots usually start at 0 in the top-left and increase left-to-right, then down each row.
- Container slots — indexes for the chest/menu itself.
- Player inventory — when shown below the container, continues after the last container slot (exact offset depends on size).
- Outside click — often reported as
-999.
Do not assume a 9-slot hotbar is always indexes 0–8 in a custom menu — that is only true for the player’s own inventory view, not for a 54-slot chest GUI.
Section 02
Common layouts
| Inventory | Typical container size |
|---|---|
| Hopper | 5 slots (0–4) |
| Dropper / dispenser | 9 slots (3×3) |
| Single chest / barrel | 27 slots (3 rows) |
| Double chest / large menu | 54 slots (6 rows) |
| Furnace-style | Input / fuel / output at fixed indexes |
Always confirm against a visual map for the exact type you are configuring — furnaces and anvils are not a simple grid.
Section 03
DeluxeMenus slots: lists
DeluxeMenus (and similar menu plugins) let you fill multiple slots with one item definition:
slots:
- 10-16
- 19
- 21
- 23
- 25
- Open Inventory Slots and select your menu size (e.g. chest 54).
- Click every slot the item should occupy.
- Copy the generated list — consecutive indexes compress into ranges.
- Paste under the item in your menu YAML and validate the file.
After editing menu YAML, run it through the YAML Validator so a bad indent does not disable the whole menu plugin.
Section 04
Click handling tips
- Cancel clicks on filler / border slots so players cannot take decorative panes.
- Treat player-inventory clicks separately if your listener covers the whole view.
- Document your menu layout (or keep a screenshot) — slot maps are hard to reverse from YAML alone.
- Pair icons with correct item IDs for the server version.
FAQ
Frequently asked questions
What is a raw inventory slot?
A raw slot is the protocol / Bukkit index for a cell in the open inventory view, as returned by InventoryClickEvent#getRawSlot(). Outside clicks are often -999.
How do DeluxeMenus slot ranges work?
You can list individual indexes or ranges like 10-16. Consecutive selected slots can be compressed into ranges for cleaner configs.
Why is my icon in the wrong place?
Usually the slot index belongs to a different inventory size, or you counted from 1 instead of 0. Use a visual slot map for that exact container type.