Shops
An example shop file is here:
Settings
menu: Shop menu name, which means menu file name.
buy-more: Whether product in this shop can open buy more menu.
shop-name: Shop display name, which used in
{shop-name}
placeholder.hide-message: Whether we hide the messages that will send after player buy or sell items in this shop.
General Configs
The product configuration options set here will apply to all products. For buy-action
, sell-actions
and fail-actions
, we will auto merge the value set here and in product configs.
Items
Items is products, product can not only be real items, but also virtual items, like 100 gems economy.
Items ID / Product ID
Product ID must be a single char, because we need use them in shop menu layout
option.
display-item: Product display item in shop menu, it can be different from the real item player will obtain after purchase. For virtual items, you must set
display-item
here, otherwise they can not be displayed in GUI. For real items, you must enableauto-set-first-product
option underdisplay-item
section to let you remove this section, after enable, ifdisplay-item
is not set, the first product real items will be used as display item. This section use Item format. Optional (if not set, will use first products)display-item.modify-lore: Whether we will modify display item lore. Optional (default to true)
display-name: Set product display name in {product} placeholder and buy more menu display item. Optional.
add-lore: Set special display item add lore for this product, if not set, we will use default value set in config.yml. Optional.
bedrock: View this page.
buy-more: Set whether this product can open buy more menu, you must delete shop's buy-more option to make this option has effect! Optional.
buy-more-menu: Set up separate buy more menu settings for the product. Optional. Require 2.2.10+ version.
price-mode: Support
ANY, ALL, CLASSIC_ANY, CLASSIC_ALL
. Required.product-mode: Same as above. Required if you have products section.
Mode | ANY | ALL | CLASSIC_ANY | CLASSIC_ALL |
---|---|---|---|---|
Product Give | Give random products that meet conditions. | Give all products. | Same as ANY. | Same as ALL. |
Product /Price Take | First product/price that we found player meet condition and have enough amount. | Players must have all products/prices that meet conditions to sell. | Same as ANY. | Same as ALL. |
Price Give (means sell) | First prices meet the condition requirements. | All prices will be given. | Same as ANY. | Same as ALL. |
Price Support | Support dynamic price & | Same as ALL. | Price must be same at everytime. | Same as CLASSIC_ALL. |
Server Performances | Maybe high when you have much buy/sell requests. | Same as ALL. | Low, just like other shop plugins doing! | Same as CLASSIC_ANY. |
products: Product items. Support Item format and Economy format. You can also add Custom Sell Match Method here. Optional. If not set, player won't get anything after buy/sell. Useful for command shop.
products.conditions: Player must meet the condition to use this product. For more info, please view Single Things page.
products.give-actions: The action will run after this product is been give to player, see Action for more info. Optional. For more info, please view Single Things page.
products.give-item: Whether we will give this product item to player when he trying to buy.
buy-prices: Product buy prices. Support Item format and Economy format. You can also add Custom Sell Match Method here. Optional. If not set, product can not be purchased.
buy-prices.start-apply: Start which times this price will apply. Only supports
ANY
orALL
price type. Optional. Default to 0.buy-prices.end-apply: Last times the price will apply. Only supports
ANY
orALL
price type. Optional. Default to infinite.buy-prices.apply: Which times this price will apply, format:
[1,2,3,4]
. Only supportsANY
orALL
price type. Optional. Default use start-apply option value.buy-prices.placeholder: Price display name in {price} placeholder. Optional. Default unknown language key.
buy-prices.conditions: Player must meet the condition to use this price. Optional. Default don't have any conditions. For more info, please view Single Things page.
sell-prices: Product sell prices. Support Item format and Economy format. You can also add Custom Sell Match Method here. Optional. If not set, product can not be selled.
sell-prices also support all sub options like in
buy-prices
.sell-prices.give-actions: The action will run after this sell price is been give to player, see Action for more info. Optional. For more info, please view Single Things page.
buy-actions: The action will run after buy this product, see Action for more info. Optional.
sell-actions: The action will run after sell this product, see Action for more info. Optional.
fail-actions: The action will run if we fail to buy or sell this product, see Action for more info. Optional. In example above we put this on general-configs and set it as a fail sound.
buy-conditions: The condition player need to meet to buy this product, see Condition for more info. Optional.
sell-conditions: The condition player need to meet to sell this product, see Condition for more info. Optional.
buy-limits: Set the maximum times of buy/sell times. Optional. If not set, product can be purchased with unlimited times.
buy-limits.global: Global limit. Optional.
buy-limits.default: If player don't meet any condition set below, they will use this limit. Required if you have set buy-limits.
buy-limits.<Condition ID>: Players who meet this condition will use this limit. Condition format can be found at Conditions. For example:
buy-limits-reset-mode: Support NEVER, TIMER, TIMED. If buy-limits section exists and this option does not exist, we will use default value which set in config.yml file. Required if you have set buy-limits.
Mode | TIMER | TIMED |
---|---|---|
Refresh Rule | Will reset use times every (first)XX hours, (second)XX minutes, (third)XX second you set here. | Will reset each day time (first)XX:(second)XX:(third)XX. |
buy-limits-reset-time: See above to know more, format is
XX:XX:XX
. If buy-limits section exists and this option does not exist, we will use default value which set in config.yml file.
For example, you set reset-time to 15:00:00, and now time is 2023-09-04 12:00:00.
For TIMER: Will reset after 15 hours, which means 2023-09-05 03:00:00.
For TIMED: Will reset at 2023-09-04 15:00:00.
sell-limits: Same as buy-limits, but use for sell.
buy-cooldown-mode: Set product purchase cooldown mode. Unlike limits, cooldown is refreshed after each purchase. Optional.
buy-cooldown-time: Set product purchase cooldown. Optional.
sell-cooldown-mode: Set product sell cooldown mode. Unlike limits, cooldown is refreshed after each sell. Optional.
sell-cooldown-time: Set product sell cooldown. Optional.
Sub Buttons - Premium
Sometimes, you want to display same product in different menus, or you want to make 2 or more buttons for same product. Well, as-sub-button
option can help you. Just set another product ID here, then this button will also be considered as the product you set here.
display-item: Supports set different display item for sub buttons.
as-sub-button: Type
Product ID
orShopID;;ProductID
here.
Buttons
Shops can add buttons which has custom actions when player clicks it, view Menus page for more info.
Different from single thing's give-actions and item's buy-actions/sell-actions
give-actions
only executed when the single thing is used and give to player.buy-actions/sell-actions
will always executed when player successfully buy or sell the item.give-actions
's{amount}
placeholder will return the single price/product amount,buy-actions/sell-actions
will return the amount player buy or sell the item in this time. For example, player sell 64x apple, and obtain 100 coins by this,give-actions
's{amount}
placeholder will return 100, andbuy-actions/sell-actions
will return 64.
Dynamic Value
You can set dynamic value in buy-prices
, sell-prices
section's amount
option and buy-limits
, sell-limits
section's value in shop configs.
Also in buy-prices
and sell-prices
section, you can set new 2 options:
max-amount: Price max amount, useful for dynamic prices. Optional.
min-amount: Price min amount, useful for dynamic prices. Optional.
Please carefully note that if you want to use our PlaceholderAPI extansion's placeholder, you have to use our new format, for example:
Additionally, you need to set menu.shop.click-update
to true
if the related to product is also in the menu you opened. Otherwise this price won't auto update after you sell B product.
Alternative Options
products.XXX.conditions
can be replaced byproducts-conditions
section.buy(sell)-prices.XXX.conditions
can be replaced bybuy(sell)-prices-conditions
section.
For example,
is same as:
Last updated