> For the complete documentation index, see [llms.txt](https://docs.myarc.icu/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.myarc.icu/en/menu-examples/server-menu.md).

# Server navigation menu

This example walks through building a two-page server navigation menu from scratch: a main page (`server-hub`) and a details page (`server-info`). Clicking "Server information" on the main page switches to the details page, clicking "Back" on the details page returns to the main page, and clicking "Help" sends a message in chat.

Save the two files below in `plugins/ArcMenu/menus/`. Because this menu only uses built-in text and rectangle elements, it displays immediately without an extra image resource pack.

## Main navigation page: `server-hub.yml`

Create `plugins/ArcMenu/menus/server-hub.yml` with the following configuration:

```yaml
schema-version: 1
id: server-hub
permission: arcmenu.use
canvas:
  width: 320
  height: 180
  pixels-per-block: 42.7
  distance: 3
frontend:
  hub-background:
    type: rectangle
    width: 200
    height: 110
    color: '#182031'
  hub-title:
    type: text
    content: '&fServer navigation'
    size: 5
    offset: {x: 0, y: 40, z: 1}
  information-button:
    type: rectangle
    width: 70
    height: 20
    color: '#365E91'
    offset: {x: -45, y: 0, z: 1}
  information-label:
    type: text
    content: '&fServer information'
    size: 3
    offset: {x: -45, y: 0, z: 2}
  help-button:
    type: rectangle
    width: 70
    height: 20
    color: '#365E91'
    offset: {x: 45, y: 0, z: 1}
  help-label:
    type: text
    content: '&fHelp'
    size: 3
    offset: {x: 45, y: 0, z: 2}
  close-label:
    type: text
    content: '&7Close'
    size: 3
    offset: {x: 0, y: -35, z: 1}
backend:
  information-area:
    x: -45
    y: 0
    width: 70
    height: 20
    actions:
      right: 'open: server-info'
  help-area:
    x: 45
    y: 0
    width: 70
    height: 20
    actions:
      right: 'tell: &eContact a server administrator if you need help.'
  close-area:
    x: 0
    y: -35
    width: 50
    height: 16
    actions:
      right: close
```

## Server information page: `server-info.yml`

Create `plugins/ArcMenu/menus/server-info.yml` with the following configuration:

```yaml
schema-version: 1
id: server-info
permission: arcmenu.use
canvas:
  width: 320
  height: 180
  pixels-per-block: 42.7
  distance: 3
frontend:
  information-background:
    type: rectangle
    width: 200
    height: 110
    color: '#182031'
  information-title:
    type: text
    content: '&fServer information'
    size: 5
    offset: {x: 0, y: 40, z: 1}
  player-label:
    type: text
    content: '&7Player: &f%player_name%'
    size: 3
    offset: {x: 0, y: 10, z: 1}
  rules-label:
    type: text
    content: '&7Welcome to your next adventure.'
    size: 3
    offset: {x: 0, y: -10, z: 1}
  back-button:
    type: rectangle
    width: 70
    height: 18
    color: '#365E91'
    offset: {x: 0, y: -35, z: 1}
  back-label:
    type: text
    content: '&fBack'
    size: 3
    offset: {x: 0, y: -35, z: 2}
backend:
  back-area:
    x: 0
    y: -35
    width: 70
    height: 18
    actions:
      right: back
```

## Key structure and configuration details

* **Canvas and depth layering**: `canvas` sets up a `320 × 180` logical grid, with `distance: 3` as the reference design distance (the menu's actual placement distance in the world is controlled by `offset.yml`, keeping a consistent visual size by default). Frontend elements use `offset.z` to control which layer appears in front: the background panel sits at `z: 0`, button backgrounds sit at `z: 1`, and button labels sit at `z: 2` so the text always renders cleanly on top of the buttons.
* **Aligning frontend and backend coordinates**: For the "Server information" button, both the frontend rectangle (`information-button`) and the backend click region (`information-area`) are placed at `x: -45, y: 0` with a size of `70 × 20`. Giving them the exact same position and dimensions ensures the clickable hitbox matches the visual button.
* **Page navigation and the back stack**: `open: server-info` pushes the current menu onto the navigation history stack and switches to the info page. The `back` action on the info page pops the previous menu from that stack and returns to `server-hub`. If a player opens `server-info` directly with a command, there is no previous page in the history, so clicking `back` simply closes the menu.
* **Click triggers**: The example binds actions under `actions.right` so they trigger on right-click. If you want both left-click and right-click to work, change `right:` to `all:`, or write the action directly as `actions: 'open: server-info'`.

## Loading the menu and setting it as the default

After saving both files, run `/arcmenu reload` to load the configurations, then run `/arcmenu open server-hub` to open the navigation menu. To open the menu, a player needs both the default `arcmenu.use` permission and the permission defined in the menu's `permission` field.

If you want players to open this navigation hub directly by pressing Shift+F in-game, add `main-menu: true` at the top level of `server-hub.yml` (and set `main-menu: false` on whichever menu previously held that flag). You can also add `open-commands: [hub, menu]` at the top level so players can open it directly by typing `/hub`.


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation by asking a question.

Perform an HTTP GET request on the following URL with the `ask` and `goal` query parameters:

```
GET https://docs.myarc.icu/en/menu-examples/server-menu.md?ask=<question>&goal=<user_goal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is what the user is ultimately trying to achieve, the reason they need the answer. Sharing it helps GitBook give you a better, more relevant answer. A goal is most helpful when it describes the outcome the user wants rather than restating the question. For example, with `ask=how do I create an API token`, a goal like `automate deployments from our CI pipeline` lets GitBook tailor the answer to that use case.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
