Skip to content

Amount Selectors

Confirm Menus contain Amount Selectors, which will purchase/sell the amount configured of the currently selected shop entry. Multiple Amount Selectors can be configured for each Confirm Menu, allowing the player to choose from different preset amounts to buy/sell. An Amount Selector will not be displayed if the "max_amount" option has been set lower than the Amount Selector’s amount. The item definition is the same as other items, see Item Options for more information.

"amounts": {
"1": {
"item": "minecraft:lime_stained_glass",
"amount": 1,
"slot": 9,
"type": "BUY",
"name": "<green>Buy 1",
"lore": [
"<gray>Click to purchase"
],
"sound": {
"id": "minecraft:ui.button.click",
"source": "MASTER",
"volume": 0.5,
"pitch": 0.1
}
}
}

The item used to represent this amount option in the GUI.

"item": "minecraft:lime_stained_glass"

The amount that this option will buy/sell when clicked.

"amount": 1

The slot that this amount option will be displayed in.

"slot": 9

Whether this amount option is for buying or selling. Must be either BUY or SELL.

"type": "BUY"

The name to override the item with. Defaults to the item’s normal name if not provided. Uses MiniMessage formatting!

"name": "<red>Example Stone"

A list of lore to override the item with. Defaults to an empty list if not provided. Uses MiniMessage formatting!

"lore": [
"<gray>Example Line 1",
"<gray>Example Line 2"
]

An number representing the Custom Model Data of the item. This is a quick option for the "minecraft:custom_model_data" component, added for ease of use. Not applied if not provided.

"custom_model_data": 123456

Aliases: nbt

A list of components that are set onto the item. This follows the same formatting as applying components to an item via /give. No additional components are applied if not provided.

"components": {
"minecraft:enchantments": {
"levels": {
"minecraft:unbreaking": 3
},
"show_in_tooltip": false
},
"minecraft:hide_additional_tooltip": {}
}

The sound that will play when this amount option is clicked and the transaction is successful.

"sound": {
"id": "minecraft:ui.button.click",
"source": "MASTER",
"volume": 0.5,
"pitch": 0.1
}