# Buttons

Before starting the configuration of the plugin, it is important to understand how zMenu works. For this you can look at this: <https://docs.zmenu.dev/plugins-files#basic_inventory.yml> Here you will find all the important information about how zMenu works.

All button functions can also be used here: <https://docs.zmenu.dev/configurations/buttons>

zShop add 9 new buttons. Tout les boutons de zShop vont avoir le prefix ZSHOP.

## Items

`ZSHOP_ITEM` Allows you to sell or buy items.

```yaml
type: ZSHOP_ITEM  
sellPrice: <price>
buyPrice: <price>
maxStack: <max stack size>
lore: <custom lore>
giveItem: <boolean>
enableLog: <boolean>
affectByPriceModifier: <boolean>
buyCommands: <string list>
sellCommands: <string list>
mob: <entity type>
economy: <economy name>
serverSellLimit: <limit>
serverBuyLimit: <limit>
playerSellLimit: <limit>
playerBuyLimit: <limit>
inventoryBuy: <specify the purchase inventory> # By default the inventory will be the one present in the config.yml
inventorySell: <specify the sell inventory> # By default the inventory will be the one present in the config.yml
unstackable: <boolean> # Allows not to stack the item during the purchase
```

You can specify the economy for an entire configuration file by specifying the economy at the root of your file.

```yaml
name: "your inventory name"
size: 54
economy: <economy name>
```

## Items Confirm

`ZSHOP_ITEM_CONFIRM` allows you to sell orders and need to confirm before purchase. To buy grades or permissions this can be very interesting

```yaml
type: ZSHOP_ITEM_CONFIRM
price: <price>
enableLog: <boolean>
economy: <economy name>
confirm-actions: <confirm actions> # Use zMenu actions
inventoryConfirm: <specify the confirm inventory> # By default the inventory will be the one present in the config.yml
```

## Add

`ZSHOP_ADD` is used in the inventory to choose the number of items to buy or sell. It increases the number of items desired. You can choose the number, or put a placeholder (as the default plugin does)

```yaml
type: ZSHOP_ADD
amount: <amount>
```

## Remove

`ZSHOP_REMOVE` is used in the inventory to choose the number of items to buy or sell. It decreases the number of items desired. You can choose the number, or put a placeholder (as the default plugin does)

```yaml
type: ZSHOP_REMOVE
amount: <amount>
```

## Buy More

`ZSHOP_BUY_MORE` is used in the inventory to buy additional stacks. You have to put in there the number of items the player will buy. In the default configuration it is directly a multiple of 64, but you can put anything else.

```yaml
type: ZSHOP_BUY_MORE
amount: <amount>
```

## Confirm Buy

`ZSHOP_CONFIRM_PURCHASE` confirms a purchase.

```yaml
type: ZSHOP_ITEM_CONFIRM
```

## Confirm Sell

`ZSHOP_CONFIRM_SELL` confirms a sale.

```yaml
type: ZSHOP_ITEM_SELL
```

## Show

`ZSHOP_SHOW` displays the item that the player will buy or sell, it will be displayed in the inventory to choose the number of items.

```yaml
type: ZSHOP_SHOW
lore: <string list>
```

## Show Confirm

`ZSHOP_SHOW_CONFIRM` will display the item that the player will purchase. Is used to confirm a purchase of a `ZSHOP_ITEM_CONFIRM`.

```yaml
type: ZSHOP_SHOW_CONFIRM
```


---

# Agent Instructions: Querying This Documentation

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

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://zshop.groupez.dev/configurations/buttons.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
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.
