> ## Documentation Index
> Fetch the complete documentation index at: https://andcze.mintlify.site/llms.txt
> Use this file to discover all available pages before exploring further.

# Minecraft Plugin

> Connect your shop to your server: generate a plugin key and a ready-made config.yml file.

The **Plugin** tab connects your ItemShop.dev shop to your Minecraft server. Thanks to the plugin, orders from your shop are fulfilled automatically — when a player pays, the plugin runs the commands assigned to the purchased product on your server (e.g. granting a rank, adding an item, depositing money into the player's account).

<Frame caption="The Plugin tab: plugin key and ready-made config.yml file">
  <img src="https://mintcdn.com/andcze/6Qp9zwUm8VUzRssf/images/panel/plugin.png?fit=max&auto=format&n=6Qp9zwUm8VUzRssf&q=85&s=bca771ebf5dabc44211427e743a7c5b9" alt="View of the Plugin tab with the key and configuration" width="1280" height="720" data-path="images/panel/plugin.png" />
</Frame>

On this page you'll do two things: **generate a dedicated plugin key** and **download a ready-made config.yml file** that you'll paste onto your server. That's all it takes for your shop to "talk" to your server.

## How it works

<Columns cols={2}>
  <Card title="Plugin key" icon="key-round">
    A unique, secret string of characters that confirms it's really your shop connecting to the server. Without the correct key, the server won't accept orders.
  </Card>

  <Card title="config.yml file" icon="file-code">
    A ready-made configuration that you paste onto your server. It already contains your key and the list of servers — you don't have to type anything in by hand.
  </Card>
</Columns>

## What you see on the page

The page is divided into three parts, arranged from top to bottom — you go through them one by one.

<Columns cols={3}>
  <Card title="Plugin download" icon="plug">
    Right at the top is a section with the server add-on. The **Download plugin** button is inactive for now and labeled "coming soon" — we're still preparing the add-on file itself. You can, however, prepare the configuration right now.
  </Card>

  <Card title="Plugin key" icon="key-round">
    The section labeled **1. Plugin key**. Here, with a single click, you create the secret key that connects your shop to your server.
  </Card>

  <Card title="config.yml file" icon="file-code">
    The section labeled **2. config.yml**. Here you see the ready-made configuration, which you'll copy or download to your computer.
  </Card>
</Columns>

<Note>
  The "Download plugin" section is disabled for now — that's normal. Everything you need to set up the connection with your shop is in the next two steps below.
</Note>

## Step by step

<Steps>
  <Step title="Generate the plugin key">
    In the **1. Plugin key** section, click the **Generate plugin key** button. After a moment the key appears on the screen, and in the corner you'll see a confirmation that the key was created. From that point on, it will automatically be inserted into the configuration below.

    <Warning>
      We show the key **only once** — right after you generate it. Copy it and save it somewhere safe (e.g. in a password manager). After you leave the page you won't see it in full again, and if you lose it you'll have to generate a new one.
    </Warning>

    <Note>
      The generated key is a special "plugin" type key. It only works within the scope needed to fulfill orders, so it's safe to use on your server. It will also appear in the list under the **API keys** section in settings, where you can delete it later if needed.
    </Note>
  </Step>

  <Step title="Choose a server (optional)">
    In the **2. config.yml** section, above the ready-made configuration, there's a **server selector**. You have two options:

    * **All servers** — the config.yml file will contain the list of all your servers.
    * **One selected server** — the file will be limited to just the one server you choose.

    Below the configuration you'll see a short summary of which servers ended up in the file — that way you can immediately check that they're the right ones.

    <Tip>
      If you run only one server, leave the default setting (**All servers**). The selector is useful when you have several servers and want to prepare a separate configuration for each of them.
    </Tip>

    <Note>
      If you haven't added any server yet, the selector won't appear, and the list of servers in the configuration will be empty. First add a server in the **Servers** section, then come back here and prepare the configuration again.
    </Note>
  </Step>

  <Step title="Copy or download config.yml">
    You can **copy** the ready-made file with a single click (the **Copy** button — after copying it changes to "Copied") or **download** it to your computer as a `config.yml` file. Choose whichever is more convenient for you — the result is the same.
  </Step>

  <Step title="Upload the configuration to your server">
    Place the **config.yml** file in the plugin's folder on your server (following your server's instructions), then restart the server or reload the plugin. From that moment on, orders from your shop will be fulfilled automatically.
  </Step>
</Steps>

## What the config.yml file contains

You don't need to understand any of it or type anything in by hand — everything is filled in for you. For the curious: in the file you'll find your shop's address, its name, the inserted plugin key, the list of servers, and one refresh setting.

<AccordionGroup>
  <Accordion title="Shop address and name">
    The file knows which shop it belongs to — that way the server pulls orders from your shop specifically, not someone else's.
  </Accordion>

  <Accordion title="Plugin key">
    This is where the key from step 1 is inserted. If you haven't generated it yet, you'll see the text `WKLEJ_TUTAJ_KLUCZ` here — that's a sign the key still needs to be filled in (you'll either generate it or paste it in by hand).
  </Accordion>

  <Accordion title="List of servers">
    A list of your servers (or the single selected one) that the plugin should deliver purchases to. Each server has its own name, the same as in the **Servers** section.
  </Accordion>

  <Accordion title="How often orders are checked">
    A setting that tells the plugin how often, in seconds, to ask the shop about new orders to fulfill. By default it's a value that works well for most shops — you don't need to change it.
  </Accordion>
</AccordionGroup>

<Warning>
  If you download or copy the configuration **before you generate the key**, the text `WKLEJ_TUTAJ_KLUCZ` will appear in place of the key. Such a file won't work until you insert a real key. Above the configuration you'll then see a yellow notice reminding you that you need to generate the key first. The simplest approach: key first, then copy the file.
</Warning>

## Good practices

<Note>
  If you change anything in your server settings in the panel (e.g. add a new server or change its name), generate and upload the config.yml file again so the configuration stays up to date.
</Note>

<Warning>
  **Keep your plugin key secret.** Don't give it to anyone and don't post it anywhere others can see it. Anyone who learns your key could impersonate your shop. If you have any doubt that the key might have leaked — simply generate a new one (and you can get rid of the old one in the **API keys** section), and the previous one will stop working.
</Warning>

<Tip>
  * **Key first, then the file** — generate the key before you copy or download config.yml, so you don't upload an empty configuration to your server.
  * **One file per server** — with multiple servers, prepare a separate configuration for each of them using the server selector.
  * **Run a test after uploading** — make a test purchase of a cheap product and check whether the reward correctly shows up on the server. That's the fastest way to make sure everything works.
  * **Update after changes** — after every change to your servers, refresh and upload the file again.
</Tip>
