> For the complete documentation index, see [llms.txt](https://simple.superiormc.cn/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://simple.superiormc.cn/arcmenu-wiki/menu-examples/integration-menu.md).

# Plugin integration menu example

This example calls an existing teleport service through a player command. The complete example works on Paper, Folia and Leaf; the Spigot adjustment is described below. No image resources are required.

## Prerequisites

The server must provide `/spawn`, usable by ordinary players under its providing plugin's permission rules. Test the command directly, including teleportation, cooldowns and restrictions, before adding the menu.

The button adds `myserver.menu.spawn` as a separate permission granted through your permission plugin. It does not replace the permissions required by `/spawn` itself.

## Menu file

Create `services.yml` in the platform's menu directory. This example leaves the unique main-menu setting unchanged.

```yaml
schema-version: 1
id: services
permission: arcmenu.use
canvas:
  width: 320
  height: 180
  pixels-per-block: 42.7
  distance: 3
frontend:
  service-background:
    type: rectangle
    width: 180
    height: 100
    color: '#182031'
  service-title:
    type: text
    content: '&fPlayer services'
    size: 5
    offset: {x: 0, y: 32, z: 1}
  player-label:
    type: text
    content: '&7%player_name%'
    size: 3
    offset: {x: 0, y: 15, z: 1}
  spawn-button:
    type: rectangle
    width: 100
    height: 20
    color: '#365E91'
    offset: {x: 0, y: -8, z: 1}
  spawn-label:
    type: text
    content: '&fReturn to spawn'
    size: 3
    offset: {x: 0, y: -8, z: 2}
  close-label:
    type: text
    content: '&7Close'
    size: 3
    offset: {x: 0, y: -34, z: 1}
backend:
  spawn-area:
    x: 0
    y: -8
    width: 100
    height: 20
    condition: 'perm myserver.menu.spawn'
    deny:
      - 'tell: &cYou cannot use this service.'
    actions:
      right:
        actions:
          - close
          - 'player: spawn'
  close-area:
    x: 0
    y: -34
    width: 60
    height: 16
    actions:
      right: close
```

### Closing and command order

The example closes the menu before requesting teleportation. Both actions belong to the same branch's `actions` list so the command can run after closing. For Spigot, replace the entire `actions` section in `spawn-area` with:

```yaml
actions:
  right: 'player: spawn'
```

On Spigot, closing stops subsequent actions. Use only `player: spawn` instead; teleportation closes the menu. If the command does not teleport successfully, the close button remains available.

## Loading and verification

Run `/arcmenu validate`, `/arcmenu reload` and `/arcmenu open services`. Test accounts with and without the button permission and the command's own permissions.

Calling a command does not guarantee success or bypass another plugin's cooldowns, fees or teleport restrictions. Check its feedback and the actual result.

## Other integrations

Replace `player: spawn` with the target plugin's player command. Use `console` for console commands and supply explicit player arguments; the console does not automatically target the player who clicked.

Paper-family servers can additionally use PlaceholderAPI information, Vault balances or CraftEngine item displays. See [Platform and plugin compatibility](/arcmenu-wiki/configuration-and-administration/compatibility.md). Use a providing plugin's complete transaction command for paid services rather than relying on sequential payment and reward actions.

Adjust the example for the selected platform. Verify third-party commands and behavior on a server with the providing plugin installed.
