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'
Aliases
This will define other commands that can be executed that will still open this panel.
The arguments used in the command will also be used for these aliases too, so if you
have command: 'ban player' defined, you can use /ban Player, /mute Player, /kick Player, or /warn Player they will all open the panel the same way.
aliases: ['mute','kick','warn']
Commands
Different commands that can be executed from actions that happen to a panel. See the Command Actions page for further information on how these work.
Open Commands
Commands to be executed automatically just before the panel is opened.
open:
requirements: []
commands:
- '[msg] Panel has been opened'
- '[session] set player RockyHawk'
fail: []
Close Commands
Commands to be executed automatically when the panel is closed.
close:
requirements: []
commands:
- '[msg] Panel has been closed'
fail: []
Outside Commands
These commands will execute when clicking the empty areas outside of the GUI interface.
outside:
requirements:
- '[vault] 100'
commands:
- '[msg] Example Message'
fail:
- '[msg] You need $100'
Update Delay
Specifies how often (in ticks) the panel updates:
0= No updating (static panel)>0= Updates panel contents and animations in ticks (20 ticks = 1 second)
How Updates Work
When a panel updates it will not re-parse item conditions or swap items. It will only update existing items such as refreshing placeholder values or progressing animations.
This is a separate interval from the permission observer, which does trigger full logic parsing when observed permissions change. The Permissions Observer will detect permissions being used in a panel for logic, and will automatically update the panel when permissions change.
update-delay: 20
Rows
Sets how many rows of slots the panel uses. Accepts:
- A number from
1to6(each row is 9 slots) - Or, a custom inventory type like
HOPPERfor shaped layouts
rows: 1
Inventory Lock
Default value when this is not included in the panel is false.
When set to true, the players inventory cannot be interacted with while a panel is open.
inventory-lock: false
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'
Slot Configuration
The layout: section defines what items appear in each slot of the panel.
- Slot numbers go from
0to53depending 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
conditionsin 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
conditionsto determine visibility. - Items support click events:
left-click,right-click,shift-left-click,shift-right-click. - Similarly to other panel types, you can use
actionsinstead and that will work with every click type. - Each click type contains independent Command Actions:
commands,requirements, andfailmessages.
You define your logic once in the item and reference that item under layout: as needed.
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
Slots can reference multiple item names. The plugin evaluates them top to bottom, and the first item whose conditions match will be displayed.
Inventory Panels are best for inventory interaction or dynamic interfaces. Use Dialog Panels if you want structured inputs like buttons, sliders, or text boxes.