Friend Menu
Friend Menu
Action entry that opens the Friend menu using the GUI extension's layout pool system. Items with buttonType from [FriendButtonType] are resolved dynamically. Dynamic content (friend heads, request heads) is injected at runtime. ### Écrans Une seule entrée porte tous les écrans du menu : chaque écran est une [MenuViewData] de [views], la frame de contenu du châssis vaut @view et les onglets sont des slots taggés view:<id>. Les écrans qui listent des joueurs se déclarent dans [friendListViewIds] / [requestListViewIds] — l'extension ne devine aucun id de vue. Sans views, le menu se comporte exactement comme avant : un écran unique dont le contenu est choisi par [view], et une entrée par écran dans la page.
Fields
| Field | Type | Default | Description |
|---|---|---|---|
inventoryTitle | Var<String> | <dark_gray>Amis | Title of the menu. Supports the {breadcrumb}, {view} and {root} view tokens.PlaceholdersColors |
view | String | main | Content of the single screen when no view is declared: 'main', 'friends' or 'requests'. |
views | List<MenuViewData> | empty | Addressable screens of this menu. Frames with layoutId '@view' and slots tagged 'view:<id>' resolve against the active one. |
defaultViewId | String? | — | View opened first. Empty = the first declared view. |
breadcrumbSeparator | String | DEFAULT_BREADCRUMB_SEPARATOR | MiniMessage separator inserted between breadcrumb segments by the {breadcrumb} title token.Colors |
baseMenuId | String | — | Entree open_gui servant de chassis partage : son layoutPool et ses vues fusionnent sous les notres (meme id = la notre gagne). |
friendListViewIds | List<String> | empty | Ids of the views whose content panel lists the player's friends. |
requestListViewIds | List<String> | empty | Ids of the views whose content panel lists the incoming friend requests. |
inventoryRows | Int | 6 | Number of inventory rows (1-6). |
guiType | GuiType | CUSTOM | GUI type. |
layoutPool | List<LayoutData> | empty | Pool of layout definitions. Items with `buttonType` are resolved dynamically. |
mainLayoutId | String? | — | ID of the main layout from the pool. |
contentX | Int | 1 | X origin of the content panel where friend/request heads are injected (right side of a 4/1/4 frame). |
contentY | Int | 0 | Y origin of the content panel where heads are injected. |
contentColumns | Int | 7 | Number of columns available in the content panel for heads. |
contentRows | Int | 7 | Number of rows available in the content panel for heads. |
emptySlotItem | Item | — | Item shown on a content slot that holds no friend or request yet, so the panel always reads as a grid. |
audio | GuiAudioData | — | Audio configuration. |
Common TypeWriter fields (criteria, modifiers, triggers)
| Field | Type | Default | Description |
|---|---|---|---|
criteria | List<Criteria> | empty | — |
modifiers | List<Modifier> | empty | — |
triggers | List<Ref<TriggerableEntry>> | empty | — |
How to use it
One Friend Menu entry carries every screen of the menu. Create it once, then open it with /friend or by triggering it from another entry.
- Declare the screens in
views(for examplefriendsandrequests). Frames withlayoutId@viewand slots taggedview:<id>follow the active screen, which is how tabs work. See Views, tabs and inheritance. - List the screens that show player heads:
friendListViewIdsfor the friend list,requestListViewIdsfor incoming requests. Any other screen shows no heads. - Place the head grid with
contentX,contentY,contentColumnsandcontentRows. One page holdscontentColumnstimescontentRowsheads. - Add a
PAGE_NAVitem for pagination: left click goes forward, right click goes back, and the item name shows the page counter.
Without views, the menu has a single screen whose content is chosen by view: friends or requests list heads, any other value lists none.
Head clicks: on the friend list, left click teleports and right click removes the friend. On the request list, left click accepts and right click declines.
Set baseMenuId to an open_gui entry to reuse a shared frame (borders, tabs, close button). Its layouts and views are merged under this entry's, and this entry wins when ids collide.