🎨GUI Customization

Complete guide to customizing the BlackMarket GUI appearance and layout.

Overview

The GUI is fully configurable through config.yml. You can customize:

  • Size and layout

  • Title and formatting

  • Filler items

  • Custom buttons and controls

  • Market item display slots

  • Pagination settings

  • Categories


GUI Size Configuration

Choose between two methods for setting GUI size:

gui:
  rows: 6  # 1-6 rows (automatically calculates size)

Available Sizes:

  • 1 row = 9 slots

  • 2 rows = 18 slots

  • 3 rows = 27 slots

  • 4 rows = 36 slots

  • 5 rows = 45 slots

  • 6 rows = 54 slots (maximum)

Method 2: Exact Size

Valid Sizes: 9, 18, 27, 36, 45, 54


GUI Title

Basic Title

Supports:

  • Legacy color codes (&a, &b, &l, etc.)

  • MiniMessage format (if enabled)

MiniMessage Examples

Pagination Title Format

When pagination is enabled, a page indicator is added:

Result: Black Market - Page 1/3

Available Placeholders:

  • %page% - Current page number

  • %total% - Total pages


Market Item Slots

Define where market items appear:

Default Layout (6 rows)

Common Layouts

Centered 3x5 Grid (15 items):

Border Layout (22 items):


Filler Items

Fill empty slots with decorative items:

Basic Filler

Custom Model Data

Custom Base64 Texture

Specific Slots Only

If slots not specified: Fills all empty slots


GUI Items (Buttons & Controls)

Add custom interactive items to your GUI:

Item Structure

Available Actions

Action
Description

close

Closes the GUI

next_page

Go to next page

previous_page

Go to previous page

cycle_category

Cycle through categories

none

No action (decorative)


Complete GUI Item Examples

1. Close Button

2. Next Page Button

3. Previous Page Button

4. Page Indicator

5. Category Selector

Available Placeholders:

  • %category% - Current category name

  • %categories% - List of all categories

6. Reset Timer

Available Placeholders:

  • %time_until_reset% - HH:MM:SS format

  • %reset_interval% - Configured interval

7. Info Display

8. Multiple Slot Item (Border)


Pagination Settings

Enable/Disable Pagination

Title Format

Examples:

Items Per Page

The number of items per page is determined by market-item-slots:


Category System

Enable Categories

How Categories Work

  1. Items are organized by their category property in items.yml

  2. Players can filter by category using the category selector button

  3. "All" category shows everything

Example categories from items.yml:

Category Button

Cycling Order:


Complete GUI Layouts

Layout 1: Classic Shop (6 rows)

Layout 2: Compact Design (4 rows)

Layout 3: Modern Borderless (5 rows)


Advanced Customization

Custom Model Data (Resource Packs)

Player Head with Texture

Get textures from Minecraft-Heads.comarrow-up-right


Sound Configuration

Configure sounds for GUI interactions:

Common Sounds:

  • BLOCK_CHEST_OPEN / BLOCK_CHEST_CLOSE

  • UI_BUTTON_CLICK

  • ITEM_BOOK_PAGE_TURN

  • ENTITY_PLAYER_LEVELUP

  • ENTITY_VILLAGER_YES / ENTITY_VILLAGER_NO

  • BLOCK_NOTE_BLOCK_PLING


Purchase Behavior


Testing Your GUI

  1. Save config.yml

  2. Reload: /bma reload config

  3. Open GUI: /blackmarket

  4. Test pagination: Add more items than slots

  5. Test categories: Cycle through categories

  6. Test buttons: Click all interactive elements


Common GUI Patterns

Pattern 1: Top Bar Navigation

Pattern 2: Side Navigation

Pattern 3: Bottom Controls


Troubleshooting

Items Not Showing

  1. Check market-item-slots list

  2. Verify items exist in items.yml

  3. Check items-per-reset in config

  4. Enable debug: /bma debug

Buttons Not Working

  1. Verify action is spelled correctly

  2. Check button is enabled: true

  3. Test with /bma reload

GUI Size Issues

  1. Ensure size is multiple of 9

  2. Check all slots are within range (0-53)

  3. Verify rows/size setting


Next Steps

Last updated