GUI Setup

Overview

Each GUI is a YAML file. The top-level fields define the inventory, and a list of items defines the slots and their click behaviour. Item display names and lore lines are kept in language files — the GUI files only reference language keys.

Core Fields

gui-title: "gui-claims-title"   # language file key
rows: 6                          # max 6
list-start-slot: 0
list-end-slot: 44
  • gui-title — references a key in the language file (default en_US.yml).
  • rows — number of inventory rows. Maximum allowed is 6.
  • list-start-slot — first slot used to render dynamic list entries (claims, members, …).
  • list-end-slot — last slot used by the dynamic list. Must be greater than list-start-slot and lower than rows × 9.

Item Configuration

Each item is declared as a named entry under the GUI file, with the following fields:

FieldDescription
slotSlot index inside the inventory.
materialBukkit material name (e.g. GRASS_BLOCK).
custom_model_dataBoolean — set to true to apply a custom model data value (ItemsAdder support).
custom_model_data_valueNumeric value applied when custom_model_data is true.
target-titleLanguage file key for the item's display name. Custom keys must be prefixed with custom-.
target-loreLanguage file key for the item's lore.
actionClick behaviour string (see Actions below).

Example:

ExampleItem:
  slot: 1
  material: GRASS_BLOCK
  custom_model_data: false
  custom_model_data_value: 0
  target-title: "custom-item-title"
  target-lore: "custom-item-lore"
  action: "LEFT:MSG:hey dude"

And in the language file:

custom-item-title: "&cExample item"
custom-item-lore: "&7Click me"

The reserved item names BackPage and NextPage handle pagination and cannot be modified, but you can freely add custom items with any other name.

Actions

Click types: LEFT, RIGHT, SHIFT_LEFT, SHIFT_RIGHT.

Action types:

  • CLOSE_INVENTORY — closes the GUI.
  • MSG — sends a message to the player.
  • CMD — runs a command.

For the CMD action the syntax is:

[CLICK]:CMD:[SENDER]:[COMMAND]

For example: LEFT:CMD:PLAYER:gamemode creative.