Inventory Configuration Structure

Complete YAML configuration guide for creating custom inventory menus. Learn all available options, placeholders, mathematical expressions, and display conditions without any Java code.

This guide explains how to create custom inventory menus using YAML configuration files. This is a user-friendly guide focused on the configuration format - no Java code required!

Table of Contents

Basic Structure

Every inventory configuration file has two main sections:

# Optional: Command to open this inventory
command: mymenu

Inventory:
  title: "<gold><bold>My Menu"
  rows: 3
  placeholders:
    # Custom inventory-level placeholders (optional)

Items:
  item_name:
    # Item configuration
  another_item:
    # Another item configuration

Inventory Section

The Inventory section defines the basic properties of your menu.

Required Fields

Field
Type
Description
Example

title

String

The inventory title (supports MiniMessage formatting)

"<gold>My Menu"

rows

Integer

Number of rows (1-6)

3

Optional Fields

Field
Type
Description
Example

placeholders

Section

Custom placeholders for this inventory

circle-info

Custom placeholders defined at the inventory level are available to all items in that inventory, making them perfect for shared values like page numbers or player-specific data.

Example

Items Section

The Items section contains all the items that will appear in your inventory. Each item has a unique identifier.

Basic Item Structure

Item Properties

Required Properties

Property
Type
Description
Example

material

String or List

Item material (see Material Options)

DIAMOND

slot

String/Int/List

Slot position(s) (see Slot Configuration)

5 or "4-12"

Optional Properties

Property
Type
Description
Example

amount

Integer

Stack size (1-64)

16

name

String

Display name (supports MiniMessage)

"<gold>Diamond"

lore

List

Lore lines (supports MiniMessage)

See below

enchantments

List

Enchantments

["SHARPNESS:5"]

unbreakable

Boolean

Make item unbreakable

true

itemflags

List

Item flags

["HIDE_ENCHANTS"]

pickable

Boolean

Whether players can pick up the item

false

commands

List

Commands to execute when clicked

display-condition

String

Condition to show item

placeholders

Section

Custom placeholders for this item

Material Options

Single Material

Random Material (picks one randomly)

Player Head Types

By Player Name:

By Base64 Texture:

By Texture URL:

Lore Configuration

Enchantments

Format: ENCHANTMENT_NAME:LEVEL

Item Flags

Available flags:

  • HIDE_ENCHANTS - Hide enchantments

  • HIDE_ATTRIBUTES - Hide attribute modifiers

  • HIDE_UNBREAKABLE - Hide unbreakable status

  • HIDE_DESTROYS - Hide "can destroy" info

  • HIDE_PLACED_ON - Hide "can be placed on" info

  • HIDE_POTION_EFFECTS - Hide potion effects

  • HIDE_DYE - Hide dye color

Commands

Commands are executed when a player clicks the item. Prefix options:

Prefix
Description
Example

(none)

Player command

warp spawn

[CON]

Console command

[CON] give %player% diamond 1

[INV]

Inventory action

[INV] close

[ITEM]

Item action

[ITEM] give

[50]

50% chance to execute

[50] [CON] give %player% diamond 1

Slot Configuration

Slots can be specified in multiple ways:

Single Slot

Range

List of Slots and Ranges

Using Placeholders and Math

Slots support placeholders and mathematical expressions:

Slot Grid (for reference):

Placeholders

Built-in Placeholders

Inventory-Level (available everywhere)

Placeholder
Description
Example

%rows%

Number of rows

3

%title%

Inventory title

My Menu

%command%

Command name

homes

Item-Level (available in items)

Placeholder
Description
Example

%slot%

Current slot number (0-based)

5

%currentitem%

Item index for multi-slot items

1

%player%

Player name

Steve

%online%

Online player count

42

%uuid%

Player UUID

069a79f4...

%world%

Player's world

world

PlaceholderAPI

All PlaceholderAPI placeholders work automatically:

Custom Placeholders

You can define custom placeholders that are parsed once and reused throughout the config.

Inventory-Level Custom Placeholders

These are available to ALL items:

Item-Level Custom Placeholders

These are only available within that specific item:

Placeholder Processing Order

Placeholders are processed in this order:

  1. Custom placeholders (from placeholders: section)

  2. Math expressions (wrapped in {math: ...})

  3. Plugin or/and PlaceholderAPI placeholders (if installed)

This means you can use earlier placeholders in later ones:

Mathematical Expressions

You can use mathematical expressions anywhere by wrapping them in {math: ...}:

Basic Operations

With Placeholders

Functions

Function
Description
Example

sqrt(x)

Square root

{math: sqrt(16)}4

round(x)

Round to nearest

{math: round(3.7)}4

roundDown(x)

Round down (floor)

{math: roundDown(3.7)}3

Complex Expressions

Display Conditions

Display conditions let you show/hide items based on conditions. The condition must evaluate to true for the item to appear.

Comparison Operators

Operator
Description
Example

==

Equal to

%level%==10

!=

Not equal to

%world%!=world_nether

>

Greater than

%balance%>1000

<

Less than

%homes_count%<5

>=

Greater or equal

%level%>=20

<=

Less or equal

%health%<=10

Basic Examples

With Math Expressions

String Comparisons

Complete Examples

Example 1: Simple Navigation Menu

Example 2: Player Homes Menu with Placeholders

Example 3: Shop with Conditional Items

Example 4: Pagination System

Best Practices

  1. Always set pickable: false for decorative items you don't want players to pick up

  2. Use display conditions to show/hide items dynamically

  3. Leverage custom placeholders to avoid repeating complex expressions

  4. Test mathematical expressions before deploying

  5. Use meaningful item identifiers in the Items section for easy maintenance

  6. Add empty lines in lore for better visual separation

  7. Use [INV] close at the end of command lists when you want to close the inventory

  8. Validate slot ranges - remember slots are 0-based (0-53 for 6 rows)

Troubleshooting

Item doesn't appear

  • Check display-condition - it may be evaluating to false

  • Verify slot number is within valid range (0 to rows*9-1)

  • Make sure material name is valid

Placeholders not working

  • Ensure PlaceholderAPI is installed for PAPI placeholders

  • Check placeholder spelling and syntax

  • Remember custom placeholders need to be defined in placeholders: section

Math expressions not calculating

  • Verify expression is wrapped in {math: ...}

  • Check for syntax errors in the expression

  • Ensure all placeholders used in math exist and return numbers

Commands not executing

  • Check command prefix ([CON], [INV], etc.)

  • Verify player has permission for the command

  • Test the command manually first

Last updated

Was this helpful?