# In-game delivery

When the payment is approved, the store sends the product's commands to the plugin, and it
runs them in the server console, once for each unit bought.

```text Example: a product's commands
give {player} diamond_sword 1
eco give {player} 1000
```

`{player}` becomes the buyer's nick. You define the commands in the product's delivery tab.
See [Products](/en/products/).

## How to follow it

In **Store > Servers > View Details**:

- **Pending Deliveries**: what is in this server's queue;
- **Completed Deliveries**: what already went out, with the command and the time;
- **Playing now**: who is online and the server's slots, with plugin 2.9.0 or newer;
- **On the server**: the plugin version, the software and the enabled plugins.

![The server detail: connection, plugins, players online and deliveries](shots/plugins-server-detail.webp)

| Status | What it means |
| --- | --- |
| **Pending** | In the queue, waiting for the plugin or the player |
| **Sent** | The plugin received it |
| **Delivered** | The command ran |
| **Failed** | The server did not recognize the command |

## Offline player

By default, the delivery waits: the plugin holds it and runs the commands when the player
joins the server.

To run right away even offline, like a role command, use `require-online: false` in
`config.yml`. See [the options](/en/plugins/#configuration-file-options).

## The purchase was paid and did not arrive

Follow this order:

1. **Did the player join the server?** With `require-online: true`, the delivery only goes
   out with them online.
2. **Is the nick right?** The delivery goes to the nick given at purchase. Check it in the
   [order](/en/products/orders/).
3. **Is the plugin connected?** In **Store > Servers**, check the **Last plugin connection**
   and that it uses the current token.
4. **Did the delivery fail?** In **View Details**, look for the delivery. **Failed** means a
   command the server did not recognize: check the product's commands and that they use
   `{player}`.
5. **Is the queue stuck?** If the queue does not move with the plugin connected, use
   `/hystorereload` in the console.

> [!TIP]
> Before selling, test the command in the server console with your nick. A command that
> works in the console works in the delivery.

## How long each player played

The plugin (2.9.0 or newer) counts every minute who is on each server:

- on the dashboard, each player's detail shows the **Play time**: the total, the month's,
  whether they are online now or when they were last seen. See
  [Players](/en/products/players/);
- on the store, the `/jogadores` page shows who is playing and the ranking of who played
  most.

To hide this page, turn off **Players page** in [Store Appearance](/en/appearance/), next to
the widgets.

> [!NOTE]
> If the server goes down without turning off the plugin, players on it stop counting as
> online within 3 minutes, and the stopped time does not count as play time.
