GUI

GUI Configuration Overview

This section explains how to configure the basic elements of a GUI in nwMMOUpgrade, such as filter slots, confirm buttons, titles, and item display lines.

applies-to:
  - SWORD
  - 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:

title: "&bSword Upgrade Station" #Sets the title displayed at the top of the GUI window.
rows: 6 #Defines the number of rows in the GUI.
name: "<white> </white>" #Defines the display name of the item shown in the GUI slot.
material: BLACK_STAINED_GLASS_PANE #Sets the type of item or block used in that GUI slot.
cmd: 1 # Assigns a Custom Model Data value for servers using a resource pack. Useful for customizing item appearance.
lore: #Adds descriptive hover text to the item in the GUI.
  - "&7Click to upgrade"
#Customize slot
slot: 1 

slot:
- 1-5
- 6

slot: [1,2,3,4,5]

Note: If set to "<white> </white>", the item will appear nameless to players (commonly used for filler items).

Color Code:

message.yml

1. Applies To

You can specify more than one MMOItem type that this configuration applies to.

applies-to:
  - SWORD
  - PICKAXE

2. Sound

Sound settings for each GUI can be customized here.

Note: Support Custom Sound use custom:

# 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
# Sound settings
# https://hub.spigotmc.org/javadocs/bukkit/org/bukkit/Sound.html
sounds:
  confirm-success: custom:upgrade.success # Sound on successful upgrade
  confirm-fail: custom:upgrade.fail# Sound on failed upgrade
  confirm-no-item: custom:upgrade.noitem# Sound when confirming with no item

3. Display Slots

You can customize the display slot of each item to help indicate or clarify what the slot is intended for. You can modify the name, lore, and cmd for each display item.

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
    gem: #gemadditem station
      material: PURPLE_STAINED_GLASS_PANE
      name: "<color:#00FF4F>Place the item to gem<color:#57E342>"
      lore:
        - "&7Drag and drop your gem here"
      cmd: 1
    result: #merge station
      material: RED_STAINED_GLASS_PANE
      name: "<color:#FF0000>Place the result item to merge<color:#FF1818>"
      lore:
        - "&7Drag and drop your item here"
      cmd: 1
    display-gem-un-socket: #gemunsocket station
      material: PURPLE_STAINED_GLASS_PANE
      name: "&f"
      lore:
        - "&f"
      cmd: 1
      slot: [28, 29, 30, 31, 32, 33, 34]

Example

Display Item

4. Confirm Button

The Confirm button allows players to proceed with the selected action in a station.

  slots:
    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)

Example

Confirm Button

5. Filter Item

These are the filter items placed in empty GUI slots to prevent interaction with unused areas and to avoid potential exploits or unintended behavior.

slots:
    ....
    filter:
      name: "&f" # Filter name (not displayed)
      material: BLACK_STAINED_GLASS_PANE # Filter material
      cmd: 1 # Custom Model Data (if any)

Example

Filter Item

6. Main Item

This is the main item slot used to place the primary item required

slots:
    item: 13
    result: 24 #merge station
    gem: 22 # gemadditem station
    .....

Example

item slot

Last updated