πŸ–ΌοΈCreating GUIs

🎨 CREATING GUIS

Creating GUIs

Define custom inventory menus with YAML configuration


GUIs in GUIPlus are defined as YAML files inside the plugins/GUIPlus/CustomGuis/ folder. Each file represents one GUI menu.

Tip: You can also create GUIs through the in-game editor with /gui. The editor generates the YAML for you. See Getting Started for the editor workflow.

πŸ“ GUI Structure

Every GUI file follows this structure:

id: mygui                    # Unique identifier (required)
type: chest                  # Inventory type (required)
rows: 3                      # Number of rows (chest only, 1-6)
title: Β§6My Menu             # Display title shown to players
commandAlias: mymenu         # Optional shortcut command to open this GUI
commandAliasTarget: OPTIONAL  # OPTIONAL, REQUIRED, or DISABLED
permission: my.perm.node     # Optional permission required to view
disable-scene-animation: false  # Disable animated scene transitions for this GUI
scenes:
  '0':                       # First scene (zero-indexed)
    delay: 0                 # Delay in ticks before this scene opens
    items:
      '1':                   # Item ID (unique within the scene)
        slot: 0              # Inventory slot (0-indexed, left to right, top to bottom)
        item: DIAMOND        # Material type
        amount: 1            # Stack size
        item-name: Β§bMy Item # Display name (supports color codes)
        item-lore:           # Lore lines
          - Β§7Description
        item-flags: []       # Item flags (HIDE_ENCHANTS, HIDE_ATTRIBUTES, etc.)
        unbreakable: false   # Whether the item is unbreakable
        click-events:        # Click event actions (see Click Events page)
          message:
            message: Β§aHello!
        conditions:          # Show conditions (see Conditions page)
          has-permission:
            permission: some.perm

πŸ“¦ Inventory Types

Type
Size
Description

chest

9-54 slots (1-6 rows)

Standard chest inventory. Use the rows field to set the size.

dispenser

9 slots (3x3)

Dispenser-style layout. Fixed size.

dropper

9 slots (3x3)

Dropper-style layout. Fixed size.

hopper

5 slots (1x5)

Hopper-style layout. Fixed size.

πŸ”’ Slot Numbers

Slots are numbered starting from 0, going left to right, top to bottom:

Chest (3 rows):

Hopper:

Dispenser / Dropper:

🏷 Item Properties

Each item in a scene supports the following properties:

Property
Type
Description

slot

Integer

The inventory slot position (required)

item

String

Minecraft material name, e.g. DIAMOND_SWORD (required)

amount

Integer

Stack size (default: 1)

item-name

String

Custom display name with color codes

item-lore

List

Lines of lore text

item-flags

List

Bukkit ItemFlags: HIDE_ENCHANTS, HIDE_ATTRIBUTES, HIDE_UNBREAKABLE, etc.

unbreakable

Boolean

Whether the item should be unbreakable

item-enchants

Map

Enchantments to apply, e.g. DURABILITY: 1

skullBase64

String

Base64-encoded texture for PLAYER_HEAD items (see Custom Heads)

item-custom-model-data

Integer

Custom model data value for resource packs

item-model

String

Item model key as a namespaced ID (Minecraft 1.21.2+ only)

leather-color

Integer

Leather armor color as an ARGB integer (only for leather armor items)

item-attributes

Map

Attribute modifiers (see Item Attributes below)

click-events

Map

Actions triggered on click (see Click Events)

conditions

Map

Conditions for showing this item (see Conditions)

conditionFailMessage

String

Message shown when conditions are not met

Note: The sorting-group property is managed through the in-game editor and is stored in the item's compressed data. It is not a hand-writable YAML field. See Conditions β€” Sorting Groups for details.

βš” Item Attributes

You can add attribute modifiers to items using the item-attributes property. Each attribute has a modifier with an amount, operation, and UUID:

Field
Description

Attribute key

A Bukkit attribute name (e.g., GENERIC_ATTACK_DAMAGE, GENERIC_MAX_HEALTH, GENERIC_MOVEMENT_SPEED)

Modifier key

A unique name for this modifier

amount

The modifier value

operation

ADD_NUMBER, ADD_SCALAR, or MULTIPLY_SCALAR_1

uuid

A UUID to identify this modifier (use any valid UUID)

🎨 Color Codes

GUIPlus supports standard Minecraft color codes using Β§ (section sign):

Code
Color
Code
Format

Β§0

Black

Β§l

Bold

Β§1

Dark Blue

Β§m

Strikethrough

Β§2

Dark Green

Β§n

Underline

Β§3

Dark Aqua

Β§o

Italic

Β§4

Dark Red

Β§r

Reset

Β§5

Dark Purple

Β§6

Gold

Β§7

Gray

Β§8

Dark Gray

Β§9

Blue

Β§a

Green

Β§b

Aqua

Β§c

Red

Β§d

Light Purple

Β§e

Yellow

Β§f

White

🏷 Command Alias

The commandAlias field registers a shortcut command for your GUI:

Players can now use /shop to open this GUI directly, instead of /gui open shop.

🎯 Command Target

The commandAliasTarget field controls whether the command alias accepts a player argument:

Value
Behavior

OPTIONAL

/shop opens for self, /shop PlayerName opens for target

REQUIRED

/shop PlayerName is required (useful for admin tools)

DISABLED

No player argument accepted

πŸ›‘ Example: Complete Admin Panel


← Previous
Next β†’

Last updated