---
description: How to edit and add interface items.
---

# Interface Guide

## Overview

All interface items can be found in the `interfaces.yml` file. Interface items are designed to execute a action when clicked.

## Supported Actions

* buy                       - Buy selected shop item
* sell                        - Sell selected shop item
* next\_page            - Next shop page&#x20;
* previous\_page     - Previous shop page
* display                  - Display selected shop item
* back                      - Previous menu
* command             - Runs listed commands
* none                      - Does nothing

## Create Interface In-Game

1. Create the interface:   `/shop create interface <name>`

If you followed these steps you should now know how to create interfaces in-game. Keep in mind the menu will need to exist already to create a interface for it.

## Create Interface YAML

1.  Open the `interfaces.yml` and create a new key under the key `interfaces`. You'll want to match the size of the menu or default interface.

    ```yaml
    test_menu:
        size: 36
        items:
          '1':
            item: rO0ABXNyABpvcmcuYnVra2l0LnV0aWwuaW8uV3JhcHBlcvJQR+zxEm8FAgABTAADbWFwdAAPTGphdmEvdXRpbC9NYXA7eHBzcgA1Y29tLmdvb2dsZS5jb21tb24uY29sbGVjdC5JbW11dGFibGVNYXAkU2VyaWFsaXplZEZvcm0AAAAAAAAAAAIAAkwABGtleXN0ABJMamF2YS9sYW5nL09iamVjdDtMAAZ2YWx1ZXNxAH4ABHhwdXIAE1tMamF2YS5sYW5nLk9iamVjdDuQzlifEHMpbAIAAHhwAAAABHQAAj09dAABdnQABHR5cGV0AARtZXRhdXEAfgAGAAAABHQAHm9yZy5idWtraXQuaW52ZW50b3J5Lkl0ZW1TdGFja3NyABFqYXZhLmxhbmcuSW50ZWdlchLioKT3gYc4AgABSQAFdmFsdWV4cgAQamF2YS5sYW5nLk51bWJlcoaslR0LlOCLAgAAeHAAAAufdAAIUkVEX1NBTkRzcQB+AABzcQB+AAN1cQB+AAYAAAAEcQB+AAh0AAltZXRhLXR5cGV0AAxkaXNwbGF5LW5hbWV0ABJQdWJsaWNCdWtraXRWYWx1ZXN1cQB+AAYAAAAEdAAISXRlbU1ldGF0AApVTlNQRUNJRklDdACLeyJleHRyYSI6W3siYm9sZCI6dHJ1ZSwiaXRhbGljIjpmYWxzZSwidW5kZXJsaW5lZCI6ZmFsc2UsInN0cmlrZXRocm91Z2giOmZhbHNlLCJvYmZ1c2NhdGVkIjpmYWxzZSwiY29sb3IiOiJnb2xkIiwidGV4dCI6IlRlc3QifV0sInRleHQiOiIifXNyABFqYXZhLnV0aWwuSGFzaE1hcAUH2sHDFmDRAwACRgAKbG9hZEZhY3RvckkACXRocmVzaG9sZHhwP0AAAAAAAAx3CAAAABAAAAACdAASb25lc3RvcHNob3A6YW1vdW50dAABMHQAEm9uZXN0b3BzaG9wOmFjdGlvbnQABEJBQ0t4
            action: back
            action-amount: 0
            slot: 20
    ```
2. Restart the server or reload the plugin.

## Add Interface Item In-Game

1. Get the item you want to add and put it in your main-hand slot. You can also edit the item if needed with `/shop item`.&#x20;
2. While holding the item run the command `/shop add interface <interface> <action> <slot> <action-amount/commands>`.
3. The action will be what is done when clicked. Action amount will define the value used for your selected action. The slot is the location you would like the item to show in the menu.
4. If you ran that command the item you are holding should now be added to the target interface. No restart or reload needed.

## Remove Interface Item In-Game

1. Open the menu that has the interface item you want to remove and sneak-click it. If you're OP it should give you a copy of the shop display item.
2. Now with that item in your hand run the command `/shop remove interface <interface>`.
3. If you ran that command the item you are holding should now be removed from the target interface. No restart or reload needed.
