🎨 Gui

🎨 GUI Configuration Overview

This section explains how to configure the basic elements of a GUI in nwMMOUpgrade, including filter slots, confirm buttons, GUI titles, display settings, and custom GUI items.

applies-to:
  - SWORD;KATANA
  - PICKAXE

# Sound settings
# https://hub.spigotmc.org/javadocs/bukkit/org/bukkit/Sound.html
sounds:
  confirm-success: ENTITY_EXPERIENCE_ORB_PICKUP # Sound on successful upgrade
  confirm-fail: BLOCK_ANVIL_DESTROY # Sound on failed upgrade
  confirm-no-item: BLOCK_NOTE_BLOCK_PLING # Sound when confirming with no item

# GUI customization
gui:
  title: "&bSword Upgrade Station" # GUI title
  rows: 6 # GUI rows (1-6)
  display-slots:
    item:
      material: LIME_STAINED_GLASS_PANE
      name: "<color:#00FF4F>Place the item to upgrade<color:#57E342>"
      lore:
        - "&7Drag and drop your item here"
      cmd: 1
    material:
      material: YELLOW_STAINED_GLASS_PANE
      name: "<color:#E7FF00>Place the materials<color:#F2FF08>"
      lore:
        - "&7Drag and drop the required materials here"
      cmd: 1
    chance:
      material: PINK_STAINED_GLASS_PANE
      name: "<color:#FF00F8>Place a chance-enhancing stone (if any)<color:#E68DFF>"
      lore:
        - "&7Drag and drop the chance-enhancing stone here"
      cmd: 1
    protection:
      material: BLUE_STAINED_GLASS_PANE
      name: "<color:#FF00F8>Place a protection stone (if any)<color:#E68DFF>"
      lore:
        - "&7Drag and drop the protection stone here"
      cmd: 1
  slots:
    item: 13 # Slot for the item to upgrade
    confirm:
      material: GREEN_STAINED_GLASS_PANE # Confirm button material
      name: "&a&lConfirm Upgrade" # Confirm button name
      lore: # Confirm button lore
        - "&7Click to upgrade"
        - ""
        - "&fCost: &a{cost}"
        - "&fSuccess Chance: &6{chance}%"
        - "&fMaterials:"
        - "{material}"
      slot: 40 # Confirm button slot
      cmd: 1 # Custom Model Data (if any)
    filter:
      name: "&f" # Filter name (not displayed)
      material: BLACK_STAINED_GLASS_PANE # Filter material
      cmd: 1 # Custom Model Data (if any)

Example:

Note: If any name is set to "<white> </white>", the item will appear nameless to players β€” commonly used for filler items.

🎨 Color Code Support

You can use the following color formats inside GUI text:

  • RGB – &#ffffff

  • Standard – &f

  • MiniMessage – <red>

  • Legacy Hex – &x&...

message.ymlchevron-right

🧩 1. Applies To

You can specify multiple MMOItem types that the GUI configuration applies to.

You can also target a specific MMOItem directly by using:

This lets you apply separate GUI configurations for:

  • an entire MMOItem type, or

  • a single specific item.

πŸ”Š 2. Sound

Each GUI can specify its own sound effects.

Sound can be:

  • Vanilla sound names

  • Custom sound using custom:

πŸ“¦ 3. Display Slots

Display slots act as visual indicators that help players understand what items belong in which slot.

For each display slot, you can customize:

  • Name

  • Lore

  • Material

  • Command (cmd)

  • Slot position

Supported Placeholders (for chance/material/protection items only)

Placeholder
Description

{items}

Shows all items required in the slot

{item}

Shows one required item

{item_x}

Shows a specific item by index

{count}

Shows how many items can be inserted

Example

Display Item

βœ”οΈ 4. Confirm Button

The Confirm Button allows a player to finalize the selected action in a station.

This button triggers the upgrade action defined inside the station’s configuration.

Example

Confirm Button

🧱 5. Filter Item

Filter items are placed in empty or unused GUI slots to:

  • Prevent players from interacting with those slots

  • Prevent exploits

  • Fill unused space visually

Filter items usually use filler panes or blank items.

Example

Filter Item

⭐ 6. Custom GUI Item

Custom GUI Items allow you to add fully customized items anywhere inside the GUI.

They can:

  • Display a custom name

  • Display custom lore

  • Perform custom actions when clicked

  • Be placed in single or multiple slots

  • Use any material

  • Include commands via actions:

These items do not affect the upgrade logic β€” they are utility or decorative items added to the GUI.

Configuration Example


πŸ—οΈ 7. Main Item

This represents the primary slot used to place the item that will be upgraded or processed.

Players must place their main item here for the station to work.

Example

item slot

Last updated