Skip to main content

đŸ–Ĩī¸ GUI Customization

MMOItemsUpgrade features a highly dynamic GUI system that can adjust displays in real-time based on item states.

đŸ—ēī¸ Layout Overview (3x9)​

Default size is 3 rows (0-26 slots). Default configuration slots:

  • 10: Item Input
  • 11-15: Material Slots
  • 16: Scroll Slot
  • 19: Upgrade Button
  • Others: Background/Decoration

📄 Full Config Example (gui.yml)​

# In contents/gui.yml
title: "&6&lUpgrade Center"
rows: 3
slots:
input: 10
upgrade-button: 19
materials: [11, 12, 13, 14, 15]
scroll: 16

items:
background:
material: GRAY_STAINED_GLASS_PANE
name: " "

input-placeholder:
material: RED_STAINED_GLASS_PANE
name: "&cPlace equipment to upgrade"

# Button: Requirement NOT met
upgrade-button-disabled:
material: ANVIL
name: "&cCannot Upgrade"
base-lore:
- "&7Current: &e{current_level}"
- "&7Target: &e{next_level}"
- ""
missing-money: "&c✘ Missing Money: &f{missing} &7(Need {need})"
missing-materials-header: "&c✘ Missing Materials:"
missing-material-item: " &7- &f{name} &cx{missing}"

# Button: Requirement IS met
upgrade-button-enabled:
material: ANVIL
name: "&aâ–ļ Click to Upgrade ◀"
base-lore:
- "&7Level: &e{current_level} &7→ &e{next_level}"
- ""
success-rate-line: "&7Success Rate: &b{rate}%"
attribute-preview-header: "&e▸ Stat Preview:"
attribute-preview-item: " &7{name}: &f{current} &a→ &e{next} &7(&a+{diff}&7)"

💡 Dynamic Lore Variables​

  • {current_level} / {next_level}: Current/Target level.
  • {rate}%: Final success rate.
  • {missing}: Number of missing materials/money.
  • {diff}: Attribute increment preview (e.g., +5 Attack).

[!TIP] Using the {diff} variable in upgrade-button-enabled helps stimulate players' desire for upgrades by showing clear benefits.