# Buttons

{% hint style="info" %}
zAuctionHouse uses the [zMenu](https://docs.zmenu.dev/configurations/buttons) API, so you have all the features of [zMenu](https://docs.zmenu.dev/configurations/buttons) available from. Documentation: <https://docs.zmenu.dev/configurations/buttons>

\
We advise you to look at the zMenu documentation to better understand how the configurations work.

To configure the items, go to this page: <https://docs.zmenu.dev/configurations/items>
{% endhint %}

In this page you will find all the buttons that zAuctionHouse adds in zMenu.

{% hint style="danger" %}
Attention, if you have the slightest doubt on how to use one of the buttons, please look at the default configuration. If doubt persists please contact us at [discord](https://discord.groupez.dev/).
{% endhint %}

***

## Auction list

**For its buttons you have to specify a list of slots mandatory.**

### ZAUCTIONHOUSE\_AUCTION

Displays the list of items that are currently on sale..

### ZAUCTIONHOUSE\_EXPIRE

Displays the list of items that have expired for the player.

### ZAUCTIONHOUSE\_ITEMS

Displays the list of items the player currently has for sale.

### ZAUCTIONHOUSE\_BUYING

Displays the list of items the player has purchased.

### ZAUCTIONHOUSE\_SEARCH

Displays the list of items the player requested based on the search filter.

### ZAUCTIONHOUSE\_CATEGORY

Displays the list of items in the category that the player uses.

### ZAUCTIONHOUSE\_EXPIRE\_AND\_BUYING

Allows to display in a single inventory items expired or purchased

### ZAUCTIONHOUSE\_EXPIRE\_AND\_BUYING\_AND\_ITEMS

Allows to display in a single inventory the items bought, expired and on sale.

***

## Categories

### ZAUCTIONHOUSE\_CATEGORY

Open a category, you must specify the name of the catégory in the configuration.

```yaml
type: ZAUCTIONHOUSE_CATEGORY
category: <category name>
```

### ZAUCTIONHOUSE\_CATEGORIES\_LORE

Allows categories to be displayed on a single button. This configuration uses button type:

{% embed url="<https://builtbybit.com/resources/zauctionhouse-mc-complex-auctionhouse.41745/>" %}

{% hint style="info" %}
You must use this button there in the inventory file <mark style="color:red;">**category.yml**</mark>
{% endhint %}

Example:

```yaml
categories:
  isPermanent: true
  type: ZAUCTIONHOUSE_CATEGORIES_LORE
  categories:
    - 'home'
    - 'blocks'
    - 'potions'
    - 'tools'
    - 'weapons'
    - 'misc'
  enableText: '&a➜ %category%'
  disableText: '&7➜ %category%'
  slot: 47
  item:
    material: CLOCK
    name: '&bCategory: &f%category%'
    lore:
      - ''
      - '&7➜ All Categories'
      - '%blocks%'
      - '%potions%'
      - '%tools%'
      - '%weapons%'
      - '%misc%'
      - ''
      - '&bClick &fto cycle.'
```

The placeholder `%category%` allows to display the current category.

### ZAUCTIONHOUSE\_CATEGORIES\_HOME

Allows categories to be displayed on a single button. This configuration uses button type:

{% embed url="<https://builtbybit.com/resources/zauctionhouse-mc-complex-auctionhouse.41745/>" %}

{% hint style="info" %}
You must use this button there in the inventory file <mark style="color:red;">**auction.yml**</mark>
{% endhint %}

Example

```yaml
categories:
  isPermanent: true
  type: ZAUCTIONHOUSE_CATEGORIES_HOME
  categories:
    - 'home'
    - 'blocks'
    - 'potions'
    - 'tools'
    - 'weapons'
    - 'misc'
  slot: 47
  item:
    material: CLOCK
    name: '&bCategory: &fAll Categories'
    lore:
      - ''
      - '&a➜ All Categories'
      - '&7➜ Blocks'
      - '&7➜ Potions'
      - '&7➜ Tools'
      - '&7➜ Weapons'
      - '&7➜ Miscellaneous'
      - ''
      - '&bClick &fto cycle.'
```

***

## Remove All

### ZAUCTIONHOUSE\_REMOVE\_ALL\_ITEMS

Allows to recover the items that the player has put on sale.

### ZAUCTIONHOUSE\_REMOVE\_ALL\_BUYING

Retrieves items that the player has purchased.

### ZAUCTIONHOUSE\_REMOVE\_ALL\_EXPIRE

Allows you to retrieve player items that have expired.

***

## Show

### ZAUCTIONHOUSE\_SHOW\_REMOVE

Displays the item that the player will remove in the inventory removeConfirm.yml

### ZAUCTIONHOUSE\_SHOW\_BUY

Displays the item that the player will purchase in the inventory buyConfirm.yml

### ZAUCTIONHOUSE\_SHOW\_ADMIN

Displays the item that the player will remove in the inventory adminRemove.yml

***

## ZAUCTIONHOUSE\_CLAIM

Retrieves the money, does the same as the **/ah claim** command.

You can use the `refresh-placeholder: true` option to automatically update the item. If you have a storage in **SQLITE**, **SQL** or **REDIS**, the placeholder will be displayed "Loading", this option allows to update the item and avoid having the loading

***

## Sell Inventory

### ZAUCTIONHOUSE\_SELL\_INVENTORY\_ACCEPT

Allows the player to sell items at once.

### ZAUCTIONHOUSE\_SELL\_INVENTORY\_SLOT

List of slots where the player will be able to place items.

***

## ZAUCTIONHOUSE\_CHANGE\_SORT

Change the sort type for the player.

***

## ZAUCTIONHOUSE\_CHANGE\_SORTING

Change the way categories are sorted.

* Right click to advance in the list
* Left click to go back

```yaml
  change-sort:
    isPermanent: true
    type: ZAUCTIONHOUSE_CHANGE_SORTING
    sorting:
      - sorting: DECREASING_DATE
        display: "ᴅᴇᴄʀᴇᴀsɪɴɢ ᴅᴀᴛᴇ"
      - sorting: DECREASING_PRICE
        display: "ᴅᴇᴄʀᴇᴀsɪɴɢ ᴘʀɪᴄᴇ"
      - sorting: ASCENDING_DATE
        display: "ᴀsᴄᴇɴᴅɪɴɢ ᴅᴀᴛᴇ"
      - sorting: ASCENDING_PRICE
        display: "ᴀsᴄᴇɴᴅɪɴɢ ᴘʀɪᴄᴇ"
      - sorting: ALPHABETICAL_NAME
        display: "ᴀʟᴘʜᴀʙᴇᴛɪᴄᴀʟ ɴᴀᴍᴇ"
      - sorting: REVERSE_ALPHABETICAL_NAME
        display: "ʀᴇᴠᴇʀsᴇ ᴀʟᴘʜᴀʙᴇᴛɪᴄᴀʟ ɴᴀᴍᴇ"
      - sorting: SELLER_NAME_ALPHABETICAL
        display: "sᴇʟʟᴇʀ ɴᴀᴍᴇ ᴀʟᴘʜᴀʙᴇᴛɪᴄᴀʟ"
      - sorting: SELLER_NAME_REVERSE_ALPHABETICAL
        display: "sᴇʟʟᴇʀ ɴᴀᴍᴇ ʀᴇᴠᴇʀsᴇ ᴀʟᴘʜᴀʙᴇᴛɪᴄᴀʟ"
      - sorting: MATERIAL_TYPE_ALPHABETICAL
        display: "ᴍᴀᴛᴇʀɪᴀʟ ᴛʏᴘᴇ ᴀʟᴘʜᴀʙᴇᴛɪᴄᴀʟ"
      - sorting: MATERIAL_TYPE_REVERSE_ALPHABETICAL
        display: "ᴍᴀᴛᴇʀɪᴀʟ ᴛʏᴘᴇ ʀᴇᴠᴇʀsᴇ ᴀʟᴘʜᴀʙᴇᴛɪᴄᴀʟ"
      - sorting: ITEM_STACK_SIZE_ASCENDING
        display: "ɪᴛᴇᴍ sᴛᴀᴄᴋ sɪᴢᴇ ᴀsᴄᴇɴᴅɪɴɢ"
      - sorting: ITEM_STACK_SIZE_DESCENDING
        display: "ɪᴛᴇᴍ sᴛᴀᴄᴋ sɪᴢᴇ ᴅᴇsᴄᴇɴᴅɪɴɢ"
    enableText: ' #e6fff3➜ %sorting%'
    disableText: ' #8c8c8c➜ %sorting%'
    slot: 49
    item:
      url: "eyJ0ZXh0dXJlcyI6eyJTS0lOIjp7InVybCI6Imh0dHA6Ly90ZXh0dXJlcy5taW5lY3JhZnQubmV0L3RleHR1cmUvZGIyZWRlYjAxY2RjZTFkMTM1MWQ5YmY3ZmI3NTNiNmY1NzNhNTZiODY0NzcyOTlhNTEwMzNjYWFjODkzOTQwOCJ9fX0="
      name: ""
      lore:
        - "                #92bed8sᴏʀᴛ ᴛʏᴘᴇ"
        - "                    #8c8c8c&m     "
        - ""
        - "%DECREASING_DATE%"
        - "%DECREASING_PRICE%"
        - "%ASCENDING_DATE%"
        - "%ASCENDING_PRICE%"
        - "%ALPHABETICAL_NAME%"
        - "%REVERSE_ALPHABETICAL_NAME%"
        - "%SELLER_NAME_ALPHABETICAL%"
        - "%SELLER_NAME_REVERSE_ALPHABETICAL%"
        - "%MATERIAL_TYPE_ALPHABETICAL%"
        - "%MATERIAL_TYPE_REVERSE_ALPHABETICAL%"
        - "%ITEM_STACK_SIZE_ASCENDING%"
        - "%ITEM_STACK_SIZE_DESCENDING%"
        - ""
        - " #8c8c8c• #92bed8ᴄʟɪᴄᴋ #e6fff3ᴛᴏ ᴄʜᴀɴɢᴇ ᴛʜᴇ sᴏʀᴛ ᴛʏᴘᴇ #8c8c8c• "
```

You can change the order or remove element in `sorting`.

#### Sorting Types

<table data-full-width="true"><thead><tr><th>Enum Value</th><th>Description</th></tr></thead><tbody><tr><td><code>DECREASING_DATE</code></td><td>Sorts items by their expiration date in descending order (latest date first).</td></tr><tr><td><code>DECREASING_PRICE</code></td><td>Sorts items by their price in descending order (highest price first).</td></tr><tr><td><code>ASCENDING_DATE</code></td><td>Sorts items by their expiration date in ascending order (earliest date first).</td></tr><tr><td><code>ASCENDING_PRICE</code></td><td>Sorts items by their price in ascending order (lowest price first).</td></tr><tr><td><code>ALPHABETICAL_NAME</code></td><td>Sorts items alphabetically by their name in ascending order (A-Z).</td></tr><tr><td><code>REVERSE_ALPHABETICAL_NAME</code></td><td>Sorts items alphabetically by their name in descending order (Z-A).</td></tr><tr><td><code>SELLER_NAME_ALPHABETICAL</code></td><td>Sorts items alphabetically by the seller's name in ascending order (A-Z).</td></tr><tr><td><code>SELLER_NAME_REVERSE_ALPHABETICAL</code></td><td>Sorts items alphabetically by the seller's name in descending order (Z-A).</td></tr><tr><td><code>MATERIAL_TYPE_ALPHABETICAL</code></td><td>Sorts items alphabetically by their material type in ascending order (A-Z).</td></tr><tr><td><code>MATERIAL_TYPE_REVERSE_ALPHABETICAL</code></td><td>Sorts items alphabetically by their material type in descending order (Z-A).</td></tr><tr><td><code>ECONOMY_NAME_ALPHABETICAL</code></td><td>Sorts items alphabetically by the associated economy name in ascending order (A-Z).</td></tr><tr><td><code>ECONOMY_NAME_REVERSE_ALPHABETICAL</code></td><td>Sorts items alphabetically by the associated economy name in descending order (Z-A).</td></tr><tr><td><code>ITEM_STACK_SIZE_ASCENDING</code></td><td>Sorts items by their stack size in ascending order (smallest stack first).</td></tr><tr><td><code>ITEM_STACK_SIZE_DESCENDING</code></td><td>Sorts items by their stack size in descending order (largest stack first).</td></tr></tbody></table>

***

## ZAUCTIONHOUSE\_SHOW\_ITEMS

Displays items from an inventory, shulker box or barrel. Is used in sellshow\.yml inventory.

***

## ZAUCTIONHOUSE\_BUY\_CONFIRM

Allows to confirm the purchase of an item.

#### Placeholders:

* `%price%` - Show price of item
* `%seller%` - Show seller name
* `%timer%` - Display the item expiration time
* `%money-after-purchase%` - Displays the player’s money after purchasing the item

***

## ZAUCTIONHOUSE\_SHOW\_SELLER

Allows to display the head of the player who sells an item, must be used in the inventory `buyconfirm.yml`

<figure><img src="https://4233628743-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-MNnv7S-sLVu0cX0Z4As%2Fuploads%2Fgit-blob-099eaa5ed41e4e445288295b65b4a8889a2b2ae4%2Fseller_show.png?alt=media" alt=""><figcaption></figcaption></figure>

You must do this to add the item in your configuration:

```yaml
seller:
  type: ZAUCTIONHOUSE_SHOW_SELLER
  slot: 4
  item:
    material: PLAYER_HEAD 
    name: "&f%sellerName%"
    lore:
      - "&8This item is sold by %sellerName%"
```

***

## ZAUCTIONHOUSE\_UPDATE

Updates the list of items for sale.

***

## ZAUCTIONHOUSE\_ADMIN\_REMOVE

Remove an item from the sale with several options.

```yaml
type: ZAUCTIONHOUSE_ADMIN_REMOVE
isSilent: <boolean> # If the player will receive a message
isForceRemove: <boolean> # If the item will be completely removed and not given back to the player.
```

***

## Remove Confirm

### ZAUCTIONHOUSE\_REMOVE\_CONFIRM

Allows to remove an item.

### ZAUCTIONHOUSE\_REMOVE\_CONFIRM\_ADMIN

Allows to remove an item as an administrator.

## ZAUCTIONHOUSE\_ECONOMY

When you have enabled the option for sale configuration inventory, you must use this button to set the economy used when selling the item.

You must define the name of the economy as follows:

```yaml
type: ZAUCTIONHOUSE_ECONOMY
economy: "vault" # Economy name, use the same that is present in economies.yml
```

## ZAUCTIONHOUSE\_SEARCH\_INPUT

Opens a search menu. If you have the option `search.enable-search-with-protocol-lib` enabled and if you have ProtocolLib, the search is done in a sign, otherwise the search will be in the chat.

<figure><img src="https://4233628743-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-MNnv7S-sLVu0cX0Z4As%2Fuploads%2FOhKLWxFWYPqMD3dZBFEy%2Fsearch-gui.gif?alt=media&#x26;token=1e7f6f59-a69d-42b1-9e53-782852159c44" alt=""><figcaption></figcaption></figure>
