Create a GUI

GUI's are made of rows from 1 up to 6 (limited by Minecraft)

#
#   0   1   2   3   4   5   6   7   8   |
#   β–ˆβ–ˆ  β–ˆβ–ˆ  β–ˆβ–ˆ  β–ˆβ–ˆ  β–ˆβ–ˆ  β–ˆβ–ˆ  β–ˆβ–ˆ  β–ˆβ–ˆ  β–ˆβ–ˆ  | ROW 1 - [MIN]
#   9   10  11  12  13  14  15  16  17  |
#   β–ˆβ–ˆ  β–ˆβ–ˆ  β–ˆβ–ˆ  β–ˆβ–ˆ  β–ˆβ–ˆ  β–ˆβ–ˆ  β–ˆβ–ˆ  β–ˆβ–ˆ  β–ˆβ–ˆ  | ROW 2
#   18  19  20  21  22  23  24  25  26  |
#   β–ˆβ–ˆ  β–ˆβ–ˆ  β–ˆβ–ˆ  β–ˆβ–ˆ  β–ˆβ–ˆ  β–ˆβ–ˆ  β–ˆβ–ˆ  β–ˆβ–ˆ  β–ˆβ–ˆ  | ROW 3
#   27  28  29  30  31  32  33  34  35  |
#   β–ˆβ–ˆ  β–ˆβ–ˆ  β–ˆβ–ˆ  β–ˆβ–ˆ  β–ˆβ–ˆ  β–ˆβ–ˆ  β–ˆβ–ˆ  β–ˆβ–ˆ  β–ˆβ–ˆ  | ROW 4
#   36  37  38  39  40  41  42  43  44  |
#   β–ˆβ–ˆ  β–ˆβ–ˆ  β–ˆβ–ˆ  β–ˆβ–ˆ  β–ˆβ–ˆ  β–ˆβ–ˆ  β–ˆβ–ˆ  β–ˆβ–ˆ  β–ˆβ–ˆ  | ROW 5
#   45  46  47  48  49  50  51  52  53  |
#   β–ˆβ–ˆ  β–ˆβ–ˆ  β–ˆβ–ˆ  β–ˆβ–ˆ  β–ˆβ–ˆ  β–ˆβ–ˆ  β–ˆβ–ˆ  β–ˆβ–ˆ  β–ˆβ–ˆ  | ROW 6 - [MAX]
#

Structure

chevron-rightStructure - Foundationhashtag

Each GUI file must contain the following:

gui:
  title: "<black>Title"
  size: 6
  refresh-rate: 1
  inactivity-timer: 2400
  inactivity-message:
    - "<dark_grey>GUI closed due to inactivity."
  open-sound: "block.chest.open 1.0 1.0"
  close-sound: "block.chest.close 1.0 1.0"
  switch-sound: "block.chest.open 0.0 0.0"
  • title - Displayed at the top of the inventory

  • size - Number of rows

  • refresh-rate - How often to refresh the GUI items (in ticks)

  • inactivity-timer - After how many ticks of inactivity to close the GUI

  • inactivity-message - Message to show after the inactivity-timer has ended

  • open/close/switch-sound - Sounds to play when opening, closing or switching GUIs

chevron-rightStructure - Empty slotshashtag

Used to fill any unused slot in the GUI

chevron-rightStructure - Item groupshashtag

Groups can contain single items, or pages, see bellow examples.

Single item group:

  • group-id - Name of the group

  • item-type - Type of item (used for plugin-specific properties)

  • amount - The amount of the item

  • model-data - Custom model data applied to the item

  • flags - Minecraft item flags

  • material - The material of the item

  • name - The name of the item

  • lore - The lore of the item

  • actions - Used to execute custom logic, such as commands, messages, sounds or more per-click


Multi-page group:

Multi-paged groups have an extra section named settings, which includes:

  • fill-empty - Fill empty slots for the page that were previously unoccupied

  • switch.auto - Automatically start switching between pages

  • switch.order - Order in which to switch the pages

  • switch.delay - Delay of switching in between pages

  • switch.interact.stop - Stop the switching if the player has interacted with the page

  • switch.interact.timer - Timer for the stop, set to 0 to permanently pause

Other than the settings section and having page numbers, the items have the same layout as group-items (see above).

Last updated