> For the complete documentation index, see [llms.txt](https://zauctionhouse.groupez.dev/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://zauctionhouse.groupez.dev/old-configurations/buttons.md).

# Buttons

Button types:

* NONE
* NONE\_SLOT
* BACK
* HOME
* PREVIOUS
* NEXT
* INVENTORY
* PERFORM\_COMMAND
* AUCTION\_ITEM
* BUY\_INVENTORY
* SHOW\_ITEM
* REMOVE\_ITEM
* BUY\_ITEM
* CHANGE\_SORT
* CATEGORIES
* REMOVE\_ALL
* SELL\_INVENTORY\_SLOT
* SELL\_INVENTORY\_ACCEPT
* SELL\_INVENTORY\_CANCEL
* CLAIM

### Default

Here is the information that is valid for all button types.

* `type` Sets the type of the button.
* `slot` Sets the button slot.
* `isPermanent` Allows you to set a button as permanent, so the paging system will not take this button into account (you must set the value to true).
* `item` Allows you to define the item to be displayed ([Add an item](https://github.com/Maxlego08/zShop-API/wiki/How-do-I-add-an-item))
* `permission` Allows you to give permission to the.
* `elseMessage` Allows you to send a message to the user when they do not have permission to click a button.
* `else` Displays another button if the user does not have permission.
* `action` Allows you to choose the formula for the verification with place holder, you have `SUPERIOR`, `LOWER`, `SUPERIOR_OR_EQUAL`, `LOWER_OR_EQUAL`, `EQUALS_STRING` and `EQUALSIGNORECASE_STRING`
* `placeHolder` Allows to check an API placeholder variable
* `value` Allows you to set the value for placeholder verification
* `sound` Allows you to have a sound when the player clicks on the button. You have the list of sounds available here: XSound
* `volume` Changing the sound volume
* `pitch`Changing the sound pitch

Example:

```yaml
block: 
  item:
    material: GRASS_BLOCK
    name: "&aBlocks"
    lore:
      - "&7Click to access the blocks"
  type: INVENTORY
  inventory: "blocks"
  slot: 20
  sound: BLOCK_NOTE_BLOCK_PLING
  volume: 1.3f
  pitch: 0.8f
```

### NONE

Description:

* This type allows you to display a single item, no interaction is possible.

Example:

```yaml
example:
  item:
    material: GRASS_BLOCK
    name: "&cRandom name"
  type: NONE
  slot: 0
```

### NONE\_SLOT

Description:

* The type with the same works as the NONE type but allows to display the same item on several slots. Example:

```yaml
slots:
  type: NONE_SLOT
  item:
    material: GRAY_STAINED_GLASS_PANE
    name: "&e"
  slots:
    - 0
    - 1
    - 2
    - 3
    - 4
    - 5
    - 6
    - 7
    - 8
```

* `slots` Set button slots.

### BACK

Description:

* Returns to the previous inventory.

Example:

```yaml
back:
  item:
    material: BARRIER
    name: "&cBack"
  type: BACK
  slot: 49
```

### HOME

Description:

* Returns to the main inventory.

Example:

```yaml
home:
  item:
    material: BARRIER
    name: "&eHome"
  type: HOME
  slot: 49
```

### PREVIOUS

Description:

* Returns to the previous page

Example:

```yaml
previous:
  type: PREVIOUS
  isPermanent: true
  slot: 48
  item:
    material: ARROW
    name: "&fPrevious"
  else: #Displays another button if there is no previous page.
    slot: 48
    type: PREVIOUS
    isPermanent: true
    item:
      material: AIR
```

### NEXT

Description:

* Go to the next page

Example:

```yaml
next:
  type: NEXT
  isPermanent: true
  slot: 50
  item:
    material: ARROW
    name: "&fNext"
  else: #Displays another button if there is no next page.
    slot: 50
    type: NEXT
    isPermanent: true
    item:
      material: AIR
```

### INVENTORY

Description:

* Allows you to move between inventories. Please note that you can only move between inventories with a default type, otherwise you may get errors.

Example:

```yaml
block:
  item:
    material: GRASS_BLOCK
    name: "&aBlocks"
    lore:
      - "&7Click to access the blocks"
  type: INVENTORY
  inventory: "blocks"
  slot: 20
```

Value:

* `inventory` Allows you to define the name of the inventory to which you want to go.

### PERFORM\_COMMAND

Description:

* Allows the player to execute commands. And thus to navigate in the inventories of other plugin for example

Example:

```
commands:
  type: PERFORM_COMMAND
  item:
    material: EMERALD
    name: "&eClick for execute command"
  slot: 30
  commands:
    - "bc %player% est vraiment trop beau"
  closeInventory: true
```

Value:

* `commands` List of commands that will be executed by player.
* `consoleCommands` List of commands that will be executed by console.
* `closeInventory` Allows you to close the inventory before the commands are executed.
* `consolePermissionCommands` Allows commands to be executed at the console only if the player has permission.
* `consolePermission` Permission for the list above

### AUCTION\_ITEM

Description:

* Allows you to display the list of items in an inventory.

Example:

```yaml
slots:
  type: NONE_SLOT
  item:
    material: GRAY_STAINED_GLASS_PANE
    name: "&e"
  slots:
    - 0
    - 1
    - 2
    - 3
    - 4
    - 5
    - 6
    - 7
    - 8
```

### CLAIM

Description:

* Allows to display the list of intems according to the inventory.

Example:

```yaml
claim:
  type: CLAIM
  isPermanent: true
  slot: 51
  else:
    type: NONE
    item:
      material: MINECART
      name: "&fClaims money"
      lore:
        - "&f» &7You have no money on hold"
  item:
    material: HOPPER_MINECART
    name: "&aClaims money"
    lore:
      - "&f» &7You have &d%zauctionhouse_claim_vault%$&7 to claim"
```

* `slots` Set button slots.

### SELL\_INVENTORY\_SLOT

Description:

* Allows the list of items contained in an AuctionItem of inventory type. Can only be used in the SELL\_SHOW and SELL inventory type.

Example:

```yaml
items:
  type: SELL_INVENTORY_SLOT
  slots:
    - 10
    - 11
    - 12
    - 13
    - 14
    - 15
    - 16
    - 19
    - 20
    - 21
    - 22
    - 23
```

* `slots` Set button slots.

### SELL\_INVENTORY\_ACCEPT

Description:

* Allows you to accept the sale of an inventory. Can only be used in the SELL inventory type.

Example:

```yaml
accept:   
  type: SELL_INVENTORY_ACCEPT
  slot: 50
  item:
    material: GREEN_STAINED_GLASS_PANE
    name: "&fSell content"
```

### SELL\_INVENTORY\_CANCEL

Description:

* Allows you to cancel the sale of an inventory. Can only be used in the SELL inventory type.

Example:

```yaml
cancel:
  type: SELL_INVENTORY_CANCEL
  slot: 48
  item:
    material: RED_STAINED_GLASS_PANE

    name: "&fCancel"
```

### SELL\_INVENTORY\_BUY

Description:

* Allows you to purchase inventory directly from the SELL\_SHOW inventory. Can only be used in the SELL\_SHOW inventory type.

Example:

```yaml
buy:
  type: SELL_INVENTORY_BUY
  slot: 48
  item:
    material: GREEN_STAINED_GLASS_PANE
    name: "&fBuy for &b%zauctionhouse_price% %zauctionhouse_currency%"
```

### CHANGE\_SORT

Description:

* Allows you to change the sort type for items, usable only in the AUCTION inventory type.

Example:

```yaml
informations:
  type: CHANGE_SORT
  slot: 49
  isPermanent: true
  item:
    material: NETHER_STAR
    name: "&fInformations"
    lore:
      - "&7&m-------------------------------------"
      - "&f&l» &7Welcome to the auction house"
      - "&f&l» &7it's a market where all the players"
      - "&f&l» &7can sell or buy items."
      - ""
      - "&f&l» &7To be able to sell items you must do"
      - "&f&l» &a/ah sell &7<&aprice&7> &8[&7<&fnumber of items&7>&8]"
      - ""
      - "&f&l» &7Number of items available&7: &b%zauctionhouse_counts%"
      - "&f&l» &7Sort type&7: &b%zauctionhouse_sorting%"
      - "&f&l» &7Click to &bchange &7the sort type"
      - "&7&m-------------------------------------" 
```

### REMOVE\_ALL

Description:

* Allows you to remove all items that are in the ITEMS, EXPIRE and BUYING inventory.

Example:

```yaml
removeall:
  type: REMOVE_ALL
  isPermanent: true
  item:
    material: BLUE_STAINED_GLASS_PANE
    name: "&cRemove all"
  slot: 45
```

### CATEGORIES

Description:

* Displays a button to access a category. Can only be used in the CATEGORIES inventory.

Example:

```yaml
block:
  type: CATEGORIES
  category: "blocks"
  item:
    material: GRASS_BLOCK
    name: "&fCategory: Block"
    lore:
      - "&f» &7There are &b%zauctionhouse_category_item_blocks% &7items in the blocks category."
  slot: 20
weapons:
  type: CATEGORIES
  category: "weapons"
  slot: 21  
  item:
    material: DIAMOND_SWORD
    name: "&fCategory: Weapons"
    lore:
      - "&f» &7There are &b%zauctionhouse_category_item_weapons% &7items in the blocks weapons."
```

* `category` Allows you to give the name of the category to be opened.

### BUY\_ITEM

Description:

* Allows to confirm the purchase of an item, usable only in the inventory BUY\_CONFIRM.

Example:

```yaml
buy1:
  type: BUY_ITEM
  item:
    material: GREEN_STAINED_GLASS_PANE
    name: "&aBuy"
  slot: 1
```

### REMOVE\_ITEM

Description:

* Allows you to confirm the cancellation of the sale of the item, usable only in the inventory REMOVE\_CONFIRM.

Example:

```yaml
remove1:
  type: REMOVE_ITEM
  item:
    material: GREEN_STAINED_GLASS_PANE
    name: "&aRemove"
  slot: 1  
```

### SHOW\_ITEM

Description:

* Displays the item to be purchased or remove, usable only in the inventory REMOVE\_CONFIRM and BUY\_CONFIRM.

Example:

```yaml
show:
  type: SHOW_ITEM
  slot: 13
```
