Skip to main content

Inventory Panel Configuration

Inventory panels are the primary GUI type in CommandPanels for item-based interaction. They allow players to interact with items visually and intuitively, making them ideal for gameplay menus, rewards, kits, and much more.

Overview

Inventory panels are best suited for interfaces where players interact with items. These items can trigger commands, display information, or include logic for conditional rendering.

Players can also insert their own items into any empty slots of the panel (slots that contain air). However, they cannot remove items defined in the panel. If a player closes the panel with items still inside, those items will be given back to the player.


Key Features

  • Item interactions: Items can be clicked to run commands, apply conditions, or show animations.
  • Logic-based rendering: Use conditions to control which items appear per slot.
  • Animation system: Smoothly animate item frames by defining chains of items.
  • Player inventory support: Players can place items in unused panel slots.
  • Dynamic updates: Panels can be set to update periodically.

Configuration Options

Type

Defines this panel as an inventory GUI type.

type: 'inventory'

Title

The GUI title displayed to the player. Placeholders such as %player_name% or %commandpanels_session_player% are supported.

title: 'Example Title'

Conditions

Conditions that have to be met otherwise players cannot open the panel

conditions: '%player_name% $HASPERM example.permission'

Command

This is the in-game command players use to open the panel. You can include arguments, and reference them using %commandpanels_session_<arg>% inside the panel. E.g. if the command is example player, using /example RockyHawk will open the panel and the placeholder %commandpanels_session_player% will return "RockyHawk".

command: 'ban player'

Commands

A list of commands to be executed automatically when the panel is opened.

commands:
- '[msg] Panel has been opened'
- '[session] set player RockyHawk'

Floodgate

If the player is using Bedrock Edition (via GeyserMC), this option can redirect them to a compatible floodgate panel instead.

floodgate: 'floodgate_panel_example'

Update Delay

Specifies how often (in ticks) the panel updates:

  • 0 = No updating (static panel)
  • >0 = Updates panel contents and animations at the value in ticks (20 ticks = 1 second)

Note: This does not re-run logic conditions, only visuals and animations.

update-delay: 20

Rows

Sets how many rows of slots the panel uses. Accepts:

  • A number from 1 to 6 (each row is 9 slots)
  • Or, a custom inventory type like HOPPER for shaped layouts
rows: 1

Slot Configuration

The layout: section defines what items appear in each slot of the panel.

  • Slot numbers go from 0 to 53 depending on the number of rows or inventory type.
  • Under each slot number, you can define multiple item names.
  • The plugin will check each item’s conditions in top-to-bottom order and display the first matching item.

Fill

This special slot key is used to fill all empty slots with a default item. fill: supports logic via conditions, allowing for dynamic placeholder items.

layout:
fill:
- 'example_fill_item'

Item Logic

Each item is defined globally under the items: section.

  • Items can use conditions to determine visibility.
  • Items support click events: left-click, right-click, middle-click, shift-left-click, shift-right-click.
  • Similarly to other panel types, you can use actions instead and that will work with every click type.
  • Each click type contains independent Command Actions: commands, requirements, and fail messages.

You define your logic once in the item and reference that item under layout: as needed.


Animations

Items support frame-style animation.

  • Add an animate: key to an item and set it to the name of the next item.
  • Each item in the chain must be defined in items: as well.
  • When update-delay is active, the panel will cycle through the animate chain.
  • If an item does not contain an animate: key, the chain resets back to the original item.
  • The original items Command Actions will always be used when clicked even if a different animated item is being displayed

Animations loop automatically and are great for drawing attention or creating dynamic interfaces.


Player Inventory Behavior

  • Players will still be able to interact with their inventory with a panel open.
  • Players can insert their own items into empty slots in the panel.
  • These slots act like regular inventory spaces for the player’s items.
  • Items from the panel itself are protected and cannot be taken or moved.
  • If the panel is closed while player items are inside, they will drop onto the ground.

This allows for limited inventory interaction, useful for trade interfaces, filters, and more.


Tips

Logic Priority

Slots can reference multiple item names. The plugin evaluates them top to bottom, and the first item whose conditions match will be displayed.

Use Inventory for Items, Use Dialogs for Forms

Inventory Panels are best for inventory interaction or dynamic interfaces. Use Dialog Panels if you want structured inputs like buttons, sliders, or text boxes.